jQuery UI Widgets › Forums › General Discussions › Plugins › Validator, Drag & Drop, Sortable › Validate a table that change dynamically
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 11 years, 11 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
Author
-
How can I validate a table that change dynamically?
I have rules assigned to input in a cell and each row is added run-time.
May I use validation input as a class, or I have to assign an unique ID to each input?
I wish to have something like this:<head> <script type="text/ecmascript"> $(document).ready(function () { $('#testForm').jqxValidator({ rules: [ { input: '.type1', message: 'Error 1', action: 'keyup', rule: 'minLength=4' }, { input: '.type2', message: 'Error 2', action: 'keyup', rule: 'Required' }, { input: '.type3', message: 'Error 2', action: 'keyup', rule: 'email' } ], theme: 'artic' }); }); </script> </head> <body> <form id="testForm" action="./"> <table> <tr> <td> <input class="type1" type="text" /> </td> <td> <input class="type2" type="text" /> </td> <td> <input class="type3" type="text" /> </td> </tr> <tr> <td> <input class="type1" type="text" /> </td> <td> <input class="type2" type="text" /> </td> <td> <input class="type3" type="text" /> </td> </tr> <tr> <td> <input class="type1" type="text" /> </td> <td> <input class="type2" type="text" /> </td> <td> <input class="type3" type="text" /> </td> </tr> </table> </form> </body>Hello nico,
Unfortunately, class selection is not supported in jqxValidator rules.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.