-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using {{#em-form}} #57
Comments
@yazoury pulled from the documentation that I am linking below. Getting Started bower install --save ember-forms |
@yazoury I followed your steps in ember-cli app. Form is rendering but the model validations are not triggered. Below is the code I use for model. import DS from "ember-data";
export default DS.Model.extend({
title: DS.attr("string"),
description: DS.attr("string"),
created_at: DS.attr("date"),
validations: {
title: true,
description: true
}
}); and the view is {{#em-form model=list class="col-md-5"}}
{{em-input property="title" label="Title" placeholder="Title"}}
{{em-text property="description" label="Description" placeholder="Description"}}
{{/em-form}} Any idea? |
@soundarapandian If you take a look at the examples at https://github.com/dockyard/ember-validations, you'll see that your validations need to be declared like this: export default DS.Model.extend({
title: DS.attr("string"),
description: DS.attr("string"),
created_at: DS.attr("date"),
validations: {
title: { presence: true },
description: { presence: true }
}
}); |
@lexdon You are correct. I have resolved this issue few days before. Thank you for your response. 💚 |
How can I use {{#em-form}},What JS should I add to the project in order to implement the form ??
Thanks and sorry for disturbing .
The text was updated successfully, but these errors were encountered: