Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5.1 > BOOK: Professional ASP.NET MVC 5
BOOK: Professional ASP.NET MVC 5
This is the forum to discuss the Wrox book Professional ASP.NET MVC 5 by Jon Galloway, Brad Wilson, K. Scott Allen, David Matson; ISBN: 978-1-118-79475-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 16th, 2014, 04:27 PM
Authorized User
Join Date: Nov 2013
Posts: 84
Thanks: 29
Thanked 2 Times in 2 Posts
Default Ch 6-8 Data Annotations, Validation & AJAX

Hi Jon,

VS2013, VB

Using the Order class has worked fine for Data Annotations & Validation.

But on the Create View I'm getting an odd behavior I can't figure out, and it seems to be related to the following code at the bottom of the View code:

@Section Scripts 
End Section
With this code 'in play', when the email is incorrect I get in red text:
"The Email field is not a valid e-mail address. "
The validation is client side since the error shows or goes away by simply typing in the email field without clicking the Create button.

With the code above 'commented out', I get multiple and odd results. Sometimes there is a box with an arrow pointing to the email field, and the box says:
"You must enter a valid email address"
along with the red text message mentioned above. And the combination depends on the specific type of error in the email entered.

Why are there 2 error message styles and how do I fix that? Again the 'dueling' error messages are with the code NOT in play.


Best Regards,

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 10 AJAX Update Panel and measuring the page weight AlanWheeler BOOK: Beginning ASP.NET 4.5 : in C# and VB 1 January 28th, 2014 10:06 AM
Ajax Problems ch. 27 gigs BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 September 24th, 2007 05:50 AM
running example code from Ch 3 - Form Validation cshu BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 November 4th, 2006 05:52 AM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.