0

Hi

i wanted to do validation using data-validationattribute in jquery,so what i wanted to check is how to limit input in minlength and maxlength and to be only alphabet chars,so maxlength worked but minlength didn't !! it was like "not valid attribute for input in HTML5",

 <label> at least enter 45 chars </label>
           <input name="name" data-validation="custom and length" data-validation-length="min45" data-validation-regexp="^([a-z]+)$"/> 

Now this was like data-validation="custom" but i was totally just trying randomly alone and did this data-validation="custom and length" i dont know why i add and between them but this worked and i both got restriction on length and on minimum number of chars entered
so i did like thisdata-validation-length="min45 and max60" but it didnt work !
can anyone tell me how to restrict the enterd number of chars (min and max ) on the same input using data-validation-length attribute?

also if i can fing properties ofdata-validation="like what to put here to combine validation on more than one property of the input tag" ?

Thank you so much

Edited by fedaa91

2
Contributors
2
Replies
10
Views
3 Years
Discussion Span
Last Post by fedaa91
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.