I have a component which serves a form in an ember application. The form is split into sections rendered in an accordion format. I use Ember validations to validate the form. The validations for the entire form is defined and this.validate() will help getting the errors for the entire form. But, whenever a section is collapsed, a green tick icon or a red cross icon needs to be shown based on the value of fields in that section alone, which means I need to validate the fields in that particular section (a part of the form). How do I do this?
For context, the properties of the form fields follow these two patterns - accordion item 1 - [model.rship1.*], accordion items 2, 3 and 4 - [model.rship2.*]. I tried using in accordion item 1, but the length value doesn't seem to change even if I edit it. Can you suggest me a proper working way to achieve this, please?
Aucun commentaire:
Enregistrer un commentaire