1

I often have to show validation icons on forms when using ember. However when using ember validations there is immediate feedback on if the form is valid. However I do not want to display the icons until at least the user has attempted to fill out a temperate then lost focus. How would I achieve this automatically?

SuperUberDuper
  • 9,242
  • 9
  • 39
  • 72
  • http://stackoverflow.com/questions/28038852/how-to-bind-a-model-property-from-controller-without-it-firing-validation-righ – blessanm86 May 19 '15 at 07:50
  • @blessenm thanks but that is not ember validations – SuperUberDuper May 19 '15 at 07:55
  • 1
    I really liked this implementation: http://www.teamrarebit.com/blog/2015/02/14/ember-inline-validation-errors where you create a component encapsulating the input field and error text and show the error text only if focus-out is triggered on the input field. ... I also had one approach, where I triggered a css class on the container of the whole form, on submit/save, to show all errors only when the submit/save button was hit. – enspandi May 19 '15 at 10:15
  • shameless plug - I wrote this library to achieve exactly the UX you mention. https://github.com/toranb/ember-cli-simple-validation and here is a demo to see it in action http://emberjs.jsbin.com/gobemu/2/ (the only part that isn't aligned w/ your requirements is that focusOut won't fire the validation -only changing the value in the input will fire it) – Toran Billups May 21 '15 at 03:18
  • thanks @ToranBillups I will check it out, right now I need the focus out to fire. – SuperUberDuper May 21 '15 at 18:41

0 Answers0