Created
February 26, 2015 10:31
-
-
Save dburles/d461e4701eeeb89e884a to your computer and use it in GitHub Desktop.
SimpleSchema password + password (confirm)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... = new SimpleSchema({ | |
password: { | |
label: "Password *", | |
type: String | |
}, | |
passwordConfirm: { | |
label: "Password (Confirm)", | |
type: String, | |
custom: function() { | |
if (this.value !== this.field('password').value) { | |
return 'passwordMismatch'; | |
} | |
} | |
} | |
}); | |
SimpleSchema.messages({ | |
passwordMismatch: "Passwords do not match" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment