Propaganistas / Laravel-Phone

Phone number functionality for Laravel
https://laravel-phone.herokuapp.com/
MIT License
2.7k stars 214 forks source link

Invalid number format passes validation #252

Closed ravensborn closed 4 months ago

ravensborn commented 4 months ago

Hello,

Trying to validate a number with symbols appended to the end will pass the validation as a valid number.

Case:

Demo Application:

Issue also present in demo application.

image

libphonenumber's demo (This library might filter out the input before checking for the number validity):

Propaganistas commented 4 months ago

As you showed yourself libphonenumber is reporting that string to be a valid phone number string - and I'd bet it does so on purpose. Please redirect your issue to that repository or apply additional validators checking the input's format if you don't like it that way