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
The text was updated successfully, but these errors were encountered:
Gotterbild
changed the title
$validator.validateAll() started to return true all the time in 2.0.0-rc.12
$validator.validateAll() started to resolve positive all the time in 2.0.0-rc.12
Aug 16, 2017
You should read the release notes, the validator no longer throws an exception when validation fails, because technically it is an expected result. this is discussed here #507
Basically it hides the real reason behind the rejection, which could include an app error not just the validator error. Now the validator returns the result as a boolean in the then callback.
page.$validator.validateAll().then(function(result){if(result){// all good}else{// validation failed.}}).catch(function(error){// something serious has went wrong, not a validation error.});
I'm aware that such breaking changes should respect semver more, but that is why we are still at rc so we can improve the library before getting the first release, which then would respect semver more. Sorry about that.
Thanks! Sorry, but I didn't read the release notes as you just can't check out release notes of every lib you have after you run npm install, especially if you have 50+ libs :)
Usually first idea you have is that it is a bug, not a feature :)
Versions:
Description:
Everything worked with 2.0.0-rc.3
After upgrading to 2.0.0-rc.12
$validator.validateAll()
started to resolve positive all the time.Expected behavior and how it works with 2.0.0-rc.3:
$validator.validateAll()
ignoresthen
section and goes tocatch
section.:class="{show: errors.has('password:required')}"
)How it works with 2.0.0-rc.12:
$validator.validateAll()
firesthen
section and never runscatch
sectionWhen I downgrade to 2.0.0-rc.3 app works as expected.
Steps To Reproduce:
Run the fiddle: https://jsfiddle.net/v4ejau4e/2/
The text was updated successfully, but these errors were encountered: