Monday, January 18, 2016

jquery.validate.unobtrusive email validation and other validations

Email: { maxlength: 255, email:true }

Might be the way to validate an email address in the @Html.ValidationMessageFor paradigm of ASP.NET MVC. This shows a different setting other than just the required setting. I think there is also a minlength setting. Yes, there is! This has a list of the settings you may set. They are: required, remote, minlength, maxlength, rangelength, min, max, range, email, url, date, dateISO, number, digits, creditcard, equalTo (I don't see a way to break into regular expressions. There are some things you just can't do. A cross-compare of two fields followed by a judgement call might also be one of them. I don't think that is doable.)

No comments:

Post a Comment