phone-number-bundle icon indicating copy to clipboard operation
phone-number-bundle copied to clipboard

AssertPhonrNumber

Open ricardosaracino opened this issue 8 years ago • 1 comments

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

ricardosaracino avatar Feb 16 '17 03:02 ricardosaracino

How do you use it without form and expect validation?

osavchenko avatar Jun 05 '18 06:06 osavchenko