Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

model validation with @2.0.0-alpha2 #730

Closed
podviaznikov opened this Issue · 5 comments

4 participants

Anton Podviaznikov Jan Aagaard Meier Garrett Johnson freezy
Anton Podviaznikov

Are model validations work the same way described in docs?

For me if validation doesn't throw error than everything will stuck.
Should validate method return something in case of success?

Jan Aagaard Meier
Owner
Garrett Johnson

In 2.0.0-alpha2 model.validate() returns an object like {fct: function() }. The error message from a custom validator still shows up in the console, though I'm not sure where it's coming from.

Downgrading to 1.7.0-alpha2 got everything working normal again.

Anton Podviaznikov

For me following is happening:
if validator doesn't satisfy condition - error will be thrown.
Otherwise (when data was good) callback for save will never be called.

freezy

See also #722 for an example how to reproduce.

Anton Podviaznikov

I'll close this bug as duplicate to #722.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.