vendredi 7 mai 2021

Does digit_between:min, max in Laravel 5.7 accept symbols which are allowed in numeric type?

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?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3xW1n7W
via IFTTT

Aucun commentaire:

Enregistrer un commentaire