This can help. StackOverflow
So from there just create new validate func which check for string is integer or just convert it to integer
(int) "03"
Jun 24, 2015
8
Level 1
validate integer starting with 0
Hi! I would like to validate '03' to check if it is an integer. This validation should return true. I cannot use the numeric rule as I need the input to be a whole number.
'birth_date_day' => 'required|integer|between:1,31',
What's the best way to achieve this?
Level 56
Regex validation rule ?
'birth_date_day' => 'required|regex:[0-9]+|between:1,31'
Please or to participate in this conversation.