Talks about validation in general and specifically in Ember and some caveats and tips for using both, client and server side validations.
mentions ember-cp-validations and ember-changeset-validations addons
• Ember 2.16.0 (onprem) – 24 routes and 31 models • Ember 2.13 (in-house) – 9 routes and 0 models • Ember 2.11 (service) – 55 routes and 39 models Ember today in Redis Labs 3
forms in the correct format, making sure that submitted data will work successfully with our applications.” source: https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Form_validation 4
to server - Better UX - immediate awareness of what wrong and how to fix it - Reduce load on server - validation logic executed on client - Faster and easier to implement Client-side validations 5
The min and max attributes - New text INPUT types: color, date, datetime-local, email, month, number, range, search, tel, time, url, week - The pattern attribute: specifies a regular expression to validate control’s value - message customization using setCustomValidity DOM API Client-side validations - methods 10
validations 24 - Populate Model’s errors key - Population depends on adapter used - errors property on DS.Model of DS.Errors type, filled with errors payload returned from server - depends on adapter - Built-in adapters: RESTAdapter and JSONAPIAdapter - server must return 422 and JSON with errors - can be customized - Custom Adapter can implement different logic