Closed fnoquiq closed 4 years ago
I came here to open an issue, currently having the same problem:
validator:
{
first_invoice_reminder: schema.date.optional({}, [rules.after('today')]),
last_invoice_reminder: schema.date.optional({}, [
rules.afterField('first_invoice_reminder'),
]),
}
request:
{
"first_invoice_reminder": "2020-08-15T18:00:25.800-03:00",
"last_invoice_reminder": "2010-09-15T18:00:25.800-03:00",
}
and it is getting validated.
I believe that the following rules are not working:
I also opened a call on the github discussion. But no answers.
Package version
Node.js and npm version
Node: v12.18.2 Npm: 6.14.5
Sample Code (to reproduce the issue)
BONUS (a sample repo to reproduce the issue)
https://github.com/fnoquiq/adonis-validator-test
Submit this body to
http://0.0.0.0:3333
:Just remembering the rule being used in the validator: