DEV Community

Discussion on: A Clean Approach to Using Express Validator

Collapse
 
consciousness_dev profile image
Ario Setiawan

My error value just "Invalid value", not described as example :
{
"errors": [
{
"username": "username must be an email"
},
{
"password": "password must be at least 5 chars long"
},
]
}

that is from validator library or from backend?

Collapse
 
nedsoft profile image
Chinedu Orie

If you didn't specify a custom error message, then it'll assume the default message from the library

Collapse
 
consciousness_dev profile image
Ario Setiawan