odolbeau / phone-number-bundle

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

How to disable validator from form ? #177

Closed fodger closed 2 months ago

fodger commented 2 months ago

Hi, I would like to disable validator on mobile phone field for a particular form.

How to do it ?

It doesn't work with FormEvents::PRE_SUBMIT (or PRE_SET_DATA), $form->isValid() uses always Validator\Constraints\PhoneNumber !

maxhelias commented 2 months ago

Hi, You have many option :