Reputation: 724
I have a form where I add and delete fields dynamically. From the docs (https://fomantic-ui.com/behaviors/form.html#/settings), I should use "remove field(field)" to "Remove all validation for a field". However, after I use that on a field of the form, when I use "validate form" to validate the form, I get a lot of the same error in the console saying that "Form: Field identifier not found". Here's some code for example.
To remove validation from the fields, I use this:
$("#myForm").form("remove field", "txtGroupName_16");
$("#myForm").form("remove field", "ddlWorkCenters_16");
$("#myForm").form("remove field", "txtGoal_16");
..and after a button is clicked, I am validating the form:
var isValid = $('#myForm').form('validate form');
And then come the errors:
I have expanded the error to verify that it is occurring at the line where "validate form" is used. It looks like the form is still trying to validate the fields from which all validations were removed.
Has anyone come across this issue?
Upvotes: 0
Views: 99