Open Mapteg34 opened 6 years ago
i use
use Misd\PhoneNumberBundle\Validator\Constraints\PhoneNumber as AssertPhoneNumber; /** * @var string * * @ORM\Column(name="phone", type="text", nullable=false) * @AssertPhoneNumber(type="mobile") */ private $phone = '';
but they don't work:`
$user = new User(); $user->setPhone("qwerty"); $userManager->saveUser($user, "qwe");
create user with bad phone... what i need to validate phone in entity?
Use validator component. It's not triggering automatically on persist or other events.
persist
i use
but they don't work:`
create user with bad phone... what i need to validate phone in entity?