Hi,
My goal is to have a dynamic adding(append) of input field and include validation. I am using the form repeater and validation plugin to achieve this goal. However, I am getting an error every time I execute the "addField" function of the validation plugin.
This is my JS code:
fv.addField("order_item["+inc+"][item]", textValidator);
Error:
plugins.bundle.js:64 Uncaught TypeError: Cannot read properties of null (reading 'classList')
at plugins.bundle.js:64:159273
at Array.forEach (<anonymous>)
at plugins.bundle.js:64:159250
at plugins.bundle.js:64:159390
at Array.forEach (<anonymous>)
at z (plugins.bundle.js:64:159195)
at f.value (plugins.bundle.js:64:167464)
at plugins.bundle.js:64:167269
at Array.forEach (<anonymous>)
at f.value (plugins.bundle.js:64:167239)
Please revert back for the fix of this error. Thank you and looking forward to your quick response.
Hi,
Please add "fv-row" class to the input's parent as FormValidation depends on these settings to display the error messages.
For more info please refer to the FormValidation plugins integration guidelines
Regards.
Hi Sean,
Thank you very much for your help. It works!
Great! Glad to help you out