-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
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
Invalide model saves #188
Comments
+1 |
It is not a bug. Here Backbone.Validation checks for attributes: Your model has no attributes at all. So Backbone.Validation checks for nothing. You can define model's attributes defaults to get validation work as you expect.
Looks like this issue should be mentioned in ReadMe/wiki :) |
When I define some validation rule this mean that my model has such attribute. I think the plugin should not be depend on default values. Some times there is no default value |
Well, it definitely is a bug. What if my validation rules and fields are defined dynamically? |
@sharshenov, your comment went outdated. You should've linked to a line in a commit, like this: https://github.com/jashkenas/backbone/blob/1dbe3ddf2f757b0f1a23e22ca5986b6e4a3fda90/backbone.js#L35 |
Yes, it is a bug. I don't know how it took too long to get attention. Working on it. Diagnostics: http://jsfiddle.net/z17boh0h/ |
Model proceed to save while form is not valid. What is wrong?
The text was updated successfully, but these errors were encountered: