spring mvc vALIDATION NOT WORKING code example
Example 1: mvc 5 required field validation not working
//1. Get JQuery validation scripts via NuGet
//PM> install-package Microsot.JQuery.Unobtrusive.Validation
//2. Add .js reference to master page (_Layout.cshtml)
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
Example 2: mvc client validation doen't work display none
// By default validator ignores hidden fields.
// change the setting here to ignore nothing
$.validator.setDefaults({ ignore: null });