Skip to content

Instantly share code, notes, and snippets.

@dburles
Created February 26, 2015 10:31
Show Gist options
  • Save dburles/d461e4701eeeb89e884a to your computer and use it in GitHub Desktop.
Save dburles/d461e4701eeeb89e884a to your computer and use it in GitHub Desktop.
SimpleSchema password + password (confirm)
... = 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"
});
@Ulfarafijal
Copy link


  1. [ ]

  • ##>
  • [ ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment