I have been working on Laravel for a while and trying to write a validation for a form, specifically for a phone number.
For validating the phone number field, I using the digits_between:min, max validation rule
When I input a phone number without any symbols like + or - it works just fine, for eg: 918569633256 works fine and passes the digits_between validation for which min is 10 and max is 20.
But when I input something like '+918569633656', it fails the validation of digits_between . Can someone help me knowing if digits_between accepts special symbols like + or should I go with regex if I want symbols?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire