backbone-forms
backbone-forms copied to clipboard
Validation error of nested Form if not available
Browser Console Output:
_error: TypeError: this.nestedForm is undefined_
Solution: check if nestedForm is set in Line 2040 ( add if statement)
validate: function() {
if (!this.nestedForm) return;
return this.nestedForm.validate();
},
In what situation do you get this error?
- having a nested model and custom template leads to not rendered nested forms. If I press save then, this error occurs
- I fixed the original problem by following "update two" of the following stack overflow post: (the original problem is that nested Forms were not rendered automatically with a custom template)
http://stackoverflow.com/questions/17196904/backbone-forms-with-nested-models-and-custom-template
Would you be able to submit a pull request with this change? On Mar 15, 2014 4:30 PM, "sfakir" [email protected] wrote:
- having a nested model and custom template leads to not rendered nested forms. If I press save then, this error occurs
- I fixed the original problem by following "update two" of the following stack overflow post: (the original problem is that nested Forms were not rendered automatically with a custom template)
http://stackoverflow.com/questions/17196904/backbone-forms-with-nested-models-and-custom-template
Reply to this email directly or view it on GitHubhttps://github.com/powmedia/backbone-forms/issues/369#issuecomment-37730327 .