lenght validation using jquey valisaton

Solutions on MaxInterview for lenght validation using jquey valisaton by the best coders in the world

showing results for - "lenght validation using jquey valisaton"
Emilia
27 Sep 2018
1jQuery.validator.addMethod("exactlength", function(value, element, param) {
2 return this.optional(element) || value.length == param;
3}, $.validator.format("Please enter exactly {0} characters."));
Teo
11 Feb 2018
1$("#formtovalidate").validate({
2  rules: {
3    somefield: {
4      exactlength: 10
5    }
6   });