ansman / validate.js

A declarative validation library written javascript
https://validatejs.org
MIT License
2.63k stars 336 forks source link

Errors as string instead of Array #246

Closed odesey closed 6 years ago

odesey commented 6 years ago

Is there anyway to get errors as stings instead of as an array?

So instead of:

email: [
'Error one',
'Error two'
]

I want:

email: 'Error one'
ansman commented 6 years ago

No, you can do this yourself easily by mapping it to the first value or you can use another output format: http://validatejs.org/#validate-error-formatting