Files
ember-cli-dunlop/app/templates/components/validated-input.emblem
T
2018-09-28 10:52:33 -05:00

13 lines
523 B
Plaintext

/ based on https://www.emberscreencasts.com/posts/172-displaying-errors-inline-with-ember-changeset-validations
if label
label= label
else
if labelPath
label= t labelPath
one-way-input value=(get changeset attribute) update=(action 'setAttribute') onblur=(action 'validateProperty' changeset attribute) disabled=disabled onenter='inputEnter'
if (get changeset.error attribute)
each (get (get changeset.error attribute) 'validation') as |error|
.ui.pointing.red.basic.label class=errorDirection
= error