You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm trying to validate fields on submit click to show errors. But it only validate the main model, it associated fields do not. But the nested fields show the errors individually by events.
new.hbs
{{#em-formmodel=modelformLayout="default"as |form|}}
<divclass="row">
<divclass="col-md-12">
{{form.inputproperty="name"label="Name (Customer Model)"placeholder="Enter a full name..."}}
</div>
</div>
<divclass="row">
<divclass="col-md-12">
{{#eachmodel.phonesas |phonei|}}{{em-inputcid=(concat"phone-"i) label="Phone (Phone Model - Has Many)"model=phoneproperty="number"}}{{/each}}
</div>
</div>
{{/em-form}}
I think this is not really related to ember-rapid-form but more to ember-cp-validations. As you can see here, we only do model.validate(). You have to be sure than errors are set on the relationships with the validate method. I think you can try this method.
Hello! I'm trying to validate fields on submit click to show errors. But it only validate the main model, it associated fields do not. But the nested fields show the errors individually by events.
new.hbs
customer.js (model)
customer_phone.js (model)
new.js (route)
Is something wrong? Or anything I need to setup?
Thanks =)
The text was updated successfully, but these errors were encountered: