You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question that maybe someone can help me, or at least tell me if this is a bug.
I have some validation rules applied to a model that uses some built-in validation methods. At the moment, this works fine.
I was asked to add a new validation (line 15 in the JSFiddle), which is needed as a custom method. The weird thing is that when I added the custom method, the built in ones stop working.
To test: Try leaving empty the input and click the "add" button, you will notice that an alert prompts "model is valid", not entering in the required true rule. In the other hand, if you comment the line 15 in the JSFiddle, and try adding an empty value, it will enter in the previous validations.
Any clues why?
I have already tried updating versions of underscore / backbone / backbone.validation in my code, but it also doesn't work (I'm using those versions because the app I'm working on uses those).
One thing that I'm wondering is if the expected scenario of the custom validation method is to override others. I'm pretty sure it is not.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I have a question that maybe someone can help me, or at least tell me if this is a bug.
I have some validation rules applied to a model that uses some built-in validation methods. At the moment, this works fine.
I was asked to add a new validation (line 15 in the JSFiddle), which is needed as a custom method. The weird thing is that when I added the custom method, the built in ones stop working.
Here is a JSFiddle with the working case: https://jsfiddle.net/jy4784yo/2/
To test: Try leaving empty the input and click the "add" button, you will notice that an alert prompts "model is valid", not entering in the
required true
rule. In the other hand, if you comment the line 15 in the JSFiddle, and try adding an empty value, it will enter in the previous validations.Any clues why?
I have already tried updating versions of underscore / backbone / backbone.validation in my code, but it also doesn't work (I'm using those versions because the app I'm working on uses those).
One thing that I'm wondering is if the expected scenario of the custom validation method is to override others. I'm pretty sure it is not.
Thanks in advance.
The text was updated successfully, but these errors were encountered: