To have model data be dispayed in a form, which can be validated.
model: Ember.Object.create({
name: 'Fred'
}),
form: validationProxy('model', {
presence: true
})
See the IndexController and template for an example.
formis bound to the inputs, leavingmodelalone.- The user can alter the
formdata, leavingmodelalone. - The user submits the
form - The
formis validated - If validation is successful, the changes are transfered to the
modelitself.
This works fine, apart from an inconsistancy I noticed with htmlbars not adding a classname to the input when in an error state.
Notice in the screenshot bind-attr is displaying an error but htmlbars is not:
ember serve
