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
Ohhh that's a good use case. Can't believe I haven't seen that one yet. So I like to write these out in the Gherkin syntax, feel free to correct me if I'm wrong...
Given a property has validate options
when the property's value is valid
when the property is "reset"
I expect validation to return no errors.
Given a property has validate options
when the property's value is invalid
when the property is "reset"
I expect the errors for the property to be cleared.
One possible solution, and the one I'm leaning towards, is having a preFlight method that runs a callback. In the callback, you can do any checks you need to do and return a boolean. If false, can-validate will not run any validate calls and just allows the setter to do its thing. If true then we continue to validate the new value.
Is it possible to skip the validation on click of reset button or restore default values?
While using can.map.validate
The text was updated successfully, but these errors were encountered: