We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Good morning everyone, I can not perform the validation of a NestedModel because of the error you find as title. I use https://github.com/afeld/backbone-nested for nested Model. I use https://github.com/tbranyen/backbone.layoutmanager for Nested Views.
Here is my model:
define([ 'jquery', 'backbone' ], function ($, Backbone) {
'use strict'; return Backbone.NestedModel.extend({ urlRoot: '/matches', validation: { 'property.rid' : { pattern : 'email' } }, idAttribute: "rid" });
});
In my view I go:
define([ ... ], function ($, Backbone, Property, ... template) {
'use strict'; return Backbone.View.extend({ initialize: function (options) { ... this.model = new Model(); Backbone.Validation.bind(this); }, template: _.template(template), afterRender: function () { var self = this; //For Validation //this.stickit();
... },
saveModel: function (e) { e.preventDefault(); var values = this.$form.serializeObject(); values.property = new Property({ rid : values.property }).attributes; this.model.set(values); console.log(this.model.attributes) if (this.model.isValid(true)) { //Lock Form this.lockForm(); this.model.save(null, { success: _.bind(this.onSaveModelSuccess, this), error: _.bind(this.onSaveModelError, this) }); } },
....
Does somebody have some clue about my error?
Your help is really appreciated. Best Regards
The text was updated successfully, but these errors were encountered:
Please, update your Backbone.Validation to our latest version, v0.11.1. A fix is attached. 👍
I won't close this by now — will be waiting for your feedback.
Sorry, something went wrong.
No branches or pull requests
Good morning everyone,
I can not perform the validation of a NestedModel because of the error you find as title.
I use https://github.com/afeld/backbone-nested for nested Model.
I use https://github.com/tbranyen/backbone.layoutmanager for Nested Views.
Here is my model:
define([
'jquery',
'backbone'
], function ($, Backbone) {
});
In my view I go:
define([
...
], function ($, Backbone, Property, ... template) {
...
},
....
Does somebody have some clue about my error?
Your help is really appreciated. Best Regards
The text was updated successfully, but these errors were encountered: