-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Took a minute to figure out why I couldn't get validations working based on the sample, but it looks like the sample code has a bug with the validation promise.
It displays this u1.validate(function() {}):
u1.validate(function() {
if u1.isValid {
//validated, perform business logic
} else {
//validation failed, dump validation errors to the console
console.log(p1.errors)
}
});When it should call u1.validate().then(function() {}) from the validate promise:
u1.validate().then(function() {
if u1.isValid {
//validated, perform business logic
} else {
//validation failed, dump validation errors to the console
console.log(p1.errors)
}
});Thanks,
Matt
Metadata
Metadata
Assignees
Labels
No labels