Support error messages from validation promise
See original GitHub issueHello,
I am validating values remotely using VueResource and returning a Promise, which works well. The only thing I am missing is the support to display the error messages sent back by the server.
I used the vue-validator package before, which allowed me to do something like that:
return ValidationResource.validate(params, body)
.then((result) => {
return Promise.resolve()
}).catch(({ data }) => {
return Promise.reject(data[field][0])
})
I would love to have this functionality supported by vee-validator as well.
Regards, Andreas
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Custom Error Messages - express-validator
Custom Error Messages ... express-validator's default error message is a simple Invalid value . That's enough to cover all fields without being too...
Read more >How to set dynamic error messages in Yup async validation?
I am trying async validation in Formik using Yup's .test() method and need to set the error message that I get from the...
Read more >Better error handling in JavaScript | by Iain Collins - Medium
It's best to avoid throwing errors from inside a Promise, because they may not always be caught, depending on how the code that...
Read more >NG01003: Async validator must return a Promise or Observable
Async validators must return a promise or an observable, and emit/resolve them whether the validation fails or succeeds. In particular, they must implement ......
Read more >PROMISe - PA Department of Human Services
Remittance Advice Alerts/PROMISe Banner Pages · Place of Service Crosswalk ... Error Status Codes appear on Remittance Advices and are returned on ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, I agree that the error messages are not flexible enough atm, I’m exploring different approaches to this.
Just to clarify my error - function returned message from backend, but that was number 😃 and that was the problem. Promise from getLangtext() resolved number and that’s why it was not displayed in errors …