May 2014 - Digital Tool Factory blog May 2014 - Digital Tool Factory blog

The 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.


14
May 14


Written By Steve French

 




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