Compare two dates with Validator #3643
-
Hi, I was wondering if it was possible to compare 2 dates with Validator. Let's say I have a start and end date. The goal is to check that the start date is not greater than the end date and vice versa. |
Beta Was this translation helpful? Give feedback.
Answered by
Julien-R44
Mar 24, 2022
Replies: 1 comment
-
Hello 👋 Yes it is possible, take a look here : Especially : |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gribbl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello 👋
Yes it is possible, take a look here :
https://docs.adonisjs.com/reference/validator/rules/after
https://docs.adonisjs.com/reference/validator/rules/before
Especially :
https://docs.adonisjs.com/reference/validator/rules/after-field
https://docs.adonisjs.com/reference/validator/rules/before-field