Jan 19, 2023
0
Level 2
I am using From Validation Provided by Template
this is my input field
<input type="text" name="floor_name[]" required="">
Here is some Javascript From Template to validate the field
var _initValidation = function () {
_validations.push(FormValidation.formValidation(
_formEl,
{
fields: {
name: {
validators: {
notEmpty: {
message: 'Name is required'
}
}
},
tax_rate: {
validators: {
notEmpty: {
message: 'Tax rate is required'
}
}
},
'floor_name[]': {
validators: {
notEmpty: {
message: 'Floor name is required'
}
}
},
Validation is working fine for the default input field. I have placed one button next to the input field when I click that button I am appending a new input field in the current div wrapper with same name but on appended div validation rules are not working.
Please or to participate in this conversation.