Closed ruanitto closed 2 years ago
Seems like a typo in the code example. It should be options.format
.
I also tried it before. but the same error occurs. Later I'll take a look at the validator's source code and see if I can find the fix, or where I'm going wrong. Apparently the options object arrives empty
.
Seems like a bug in the code. Fixed in https://github.com/adonisjs/validator/commit/f60dea0f88bcc3bb8955ec8c8443a6068fcde1d1
Will be released soon
I need a custom message on validator for data fields to show the date format, but the options passed to the message string is undefined
Package version
12.2.3
Node.js and npm version
node: 14 npm: 6
Sample Code (to reproduce the issue)
When the error ocurrs, the options is caming undefined: