Level 104
Date Validation rule accepts a valid strtotime string
'date_of_birth' =>'required|date|before:13 years ago'
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i tried ``` Carbon::parse('2000/02/18')->diffInYears() >= 13
but like to work with the validator
because this code does not send error messages
Date Validation rule accepts a valid strtotime string
'date_of_birth' =>'required|date|before:13 years ago'
Please or to participate in this conversation.