phone-number-bundle
phone-number-bundle copied to clipboard
AssertPhonrNumber
I might be crazy but assertion region does not work (or its working correctly and im not using it right)
input value 6137257079
Region does not work only in Entity /** * @ORM\Column(name="phone", type="phone_number", length=35, nullable=false) * @AssertPhoneNumber(defaultRegion="CA") */ private $phone;
But it does work when it's on the Form Type (regardless of entity) ->add('phone', PhoneNumberType::class, ['label' => 'company.label.phone', 'default_region' => 'CA'])
would be nice to have this globally configurable as well in config.yml like tbbc_money: currencies: ["CAD"] reference_currency: "CAD" decimals: 2
How do you use it without form and expect validation?