I have several forms like this:
<?php for ($i = 0; $i > $n; $i++) { ?> // n is no. of value (no limit) <form> <input name="<?php echo $i; ?>venue" type="text"> <input name="roster" type="text"> <input type="submit" name="btn_venue"> </form> <?php } ?> <form> <input name="hospitality" type="text"> <input name="template" type="text"> <input type="submit" name="btn_hospitality"> </form> ... ... <form> <input name="element" type="text"> <input name="alignment" type="text"> <input type="submit" name="btn_xyz"> </form>
I want validate (the field should not be empty) in all form, so how can I use validation?
I tried jQuery validation:
<script> $('document').ready(function () { $('form').each(function (key, form) { $(form).validate({ rules: { hospitality: { required: true }, </script>
I manage the static validation of the name field, but I do not know about the dynamic validation of the name venue . Can anyone help me?
if only one form easily supports, but dynamically represents several forms confirming how to check.
while only one form represents, but a specific form field checks, how is this possible?
source share