You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
built-in type validators missing useful information #9488
We expect to be able to return useful validation errors for our API users/UI to understand - to do so we need the field name the error is for. With custom validation errors, we get that information and can use it to highlight fields in the UI - with any core type, we get no information other than the value that failed. It would be extremely useful if all validation errors were the same, no matter if it was a core type or custom type. If you agree I can send a PR shortly since this is a pretty easy fix.
Model.validate({id: '1234'})
What do you expect to happen?
An error resembling other validation errors, complete with an errors array, each item containing validatorKey, path, value, and message.
What is actually happening?
The only information in the error is the message attribute:
"1234" is not a valid uuid
Dialect: any Sequelize version: 5.x Tested with latest release: Yes
Activity
sushantdhiman commentedon May 29, 2018
Good idea
sushantdhiman commentedon Jul 14, 2018
Fixed in #9660