samedi 22 juin 2019

Where is this value defined - "(action (mut foo) true)"?

On the surface this is a question about ember-cp-validations but really it's about the action (mut foo) construct. I have read the release notes for when that was first introduced but it doesn't address the issue I'm raising here.

In an Ember.js template, when using ember-cp-validations, you can execute validations and control the display of the relevant error message like this .

enter image description here

When focus-out fires a property showFirstNameError is updated. That property is subsequently used to control the display or otherwise of the error message.

This works perfectly well and is consistent with the ember-cp-validation demo.

But where is the property showFirstNameError actually defined ? I was expecting it be part of the validations property or in some way part of the component, controller or route but I can't find.

Can anyone help me with this please ?




Aucun commentaire:

Enregistrer un commentaire