Created
May 6, 2015 13:07
-
-
Save danmcclain/78b5182de8493b21b462 to your computer and use it in GitHub Desktop.
Ember Validations: Controller/Component
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
import Ember from 'ember'; | |
import EmberValidations from 'ember-validations'; | |
const { Controller, computed } = Ember; | |
const { alias } = computed; | |
export default Controller.extend(EmberValidations, { | |
contact: alias('model'), | |
validations: { | |
'contact.email': { | |
presence: true | |
}, | |
'contact.name': { | |
presence: true | |
}, | |
'contact.reason': { | |
presence: true | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment