javascript - jQuery Validate multiple extensions -


I am using this verification plugin to validate the form

I've added an extension And I want to use 2 extension rule in a field

something like

  'data-valid' = & gt; In the 'Maximum, Minimum', // field  

  jQuery.validateExtend ({min: {conditional: function} {return false;}}, max: {Conditionally: work (value) {return false;}}});  

Here is an example of how many rules I want in a rule

   & Lt; / Form & gt; JQuery ('form') valid () .; JQuery.validateExtend ({age: {required: true, pattern: / ^ [0-9] + $ /, conditional function (value) {return number (value)> 17;}}});  

This can not really be your answer, but it can be done on this The pure HTML flaw is that it requires a modern browser (IE10, Chrome, Firefox etc) to use it. The advantage of this is that it is easy to use and works without js.

Check Out:

You need to specifically go to here and see the type of input = "number" min = "12" Input example:

  = "n1" name = "age" pattern = "120" step = "1" id: "how old are you" "\ D +" & gt;  

Looking at your code you are looking for an essential age input where the value should be more than 17, this would be for example:

  & Lt; Input type = "number" minute = "18" id = "age" name = "age" pattern = "\ d +" required & gt;  

Hope this helps a bit.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -