Fixed "Cannot read property 'settings'" error #1970
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, sorry for my horrible english.
I've been facing the problem on a project and searched for work-arounds on the web, but none of them lead to a right solution.
When I try to post a specific form the plugin is returning: "Cannot read property 'settings' of undefined";
Found that the problem was my code, it has a form inside another form. But that's not clear from the message above.
Instead of returning the error, I made a change to check if the property exists on the current form.
'Couse after all, this plug in is not to validate my HTML, it's made to validate my inputs.
Thanks for the awesome plugin.
Some links:
#1076
#401
#917
#86
https://elnibs.wordpress.com/2013/10/22/jquery-validation-issue-cannot-read-property-settings-of-undefined/
https://forums.asp.net/t/1853275.aspx?+Cannot+read+property+settings+of+undefined+error+when+adding+a+rule+to+validator