odolbeau / phone-number-bundle

Integrates libphonenumber into your Symfony application
MIT License
217 stars 43 forks source link

Fix PhoneNumber constraint default message #128

Closed zavarock closed 1 year ago

zavarock commented 2 years ago

If using validation by @Attribute, when it fails, the default message when there is more than one type is:

https://github.com/odolbeau/phone-number-bundle/blob/40e330c21d24903fac53aca5acb4b2ebce7a38a3/src/Validator/Constraints/PhoneNumber.php#L115

Which does not have a translated message. As I see, the default message should be "This value is not a valid phone number.".

Nek- commented 1 year ago

Yes it's nice thank you

maxhelias commented 1 year ago

The CI failed (https://github.com/odolbeau/phone-number-bundle/actions/runs/3603679058/jobs/6072168474). Can you also adapt the tests so that it comes back

Nek- commented 1 year ago

@maxhelias fixed in #134