ASP.net MVC remote validation does not check for empty strings - Digital Tool Factory blog ASP.net MVC remote validation does not check for empty strings - Digital Tool Factory blog

ASP.net MVC remote validation does not check for empty strings

This is a lesson I learn too frequently – asp.net mvc remote validation does not validate when the textbox (or whatever) is empty – it will not check empty strings and the event simply won’t fire.  Why it does this I don’t know but it does not.  I spent an annoying amount of time relearning that recently.  I guess Microsoft wants you to use the required validation fields first, but I run into many situations where the object is not required per se, but is required if some other data is entered.

 

What is the solution?  I’ve had great luck using MVC FoolProof Validation – available here.

 

Written By Steve French

 

Leave a Reply

Your email address will not be published. Required fields are marked *






Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.