Skip to content

Instantly share code, notes, and snippets.

@mockra
Created September 16, 2014 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mockra/700b942026ef9fdf2c34 to your computer and use it in GitHub Desktop.
Save mockra/700b942026ef9fdf2c34 to your computer and use it in GitHub Desktop.
import Ember from 'ember';
export default Ember.Controller.extend(Ember.Validations.Mixin, {
errors: [],
validations: {
email: {
presence: true,
format: {
with: /^[\w+\-.]+@[a-z\d\-.]+\.[a-z]+$/i,
message: 'must be a valid e-mail address'
}
},
password: {
presence: true,
length: { minimum: 8 }
},
passwordConfirmation: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment