Comments (1)
Hello @fknoll
ember-model-validator uses DS.ERRORS CLASS
from the ember-data module
, so these errors are the same errors you would get when your backend responds with any errors.
You have many options to print the errors in your template. The most basic way to do it is documented here: http://emberjs.com/api/data/classes/DS.Errors.html
Errors can be displayed to the user by accessing their property name to get an array of all the error objects for that property. Each error object is a JavaScript object with two keys:
message
A string containing the error message from the backend
attribute
The name of the property associated with this error message
Example from the document:
I'll improve the documentation this weekend to make this more clear.
from ember-model-validator.
Related Issues (20)
- An in-range update of eslint-plugin-ember is breaking the build 🚨 HOT 2
- An in-range update of ember-template-lint is breaking the build 🚨 HOT 12
- An in-range update of ember-cli-htmlbars-inline-precompile is breaking the build 🚨 HOT 1
- An in-range update of ember-cli-babel is breaking the build 🚨 HOT 9
- An in-range update of ember-cli is breaking the build 🚨 HOT 2
- An in-range update of ember-cli-htmlbars is breaking the build 🚨 HOT 1
- When do you plan to make next release? HOT 2
- `errors` is a proxy object with no length HOT 2
- model.validate() causes error HOT 6
- ember-global deprecation warning on 3.28 HOT 2
- Potential Feature: Validate from template function HOT 1
- InternalModel removed in ember 4.6 HOT 1
- not validate octane relations HOT 1
- Upgrading to ember data 2.15 trigger this WARNING: Interacting with a record errors object will no longer change the record state HOT 2
- Upgrade to ember 2.16
- We have an API that uses a `locale` property HOT 2
- An in-range update of ember-cli-htmlbars is breaking the build 🚨 HOT 1
- An in-range update of ember-cli-inject-live-reload is breaking the build 🚨 HOT 2
- An in-range update of sass is breaking the build 🚨 HOT 10
- An in-range update of ember-ajax is breaking the build 🚨 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-model-validator.