src/Sasedev/Commons/SharedBundle/Validator/PhoneValidator.php
public function validate($value, Constraint $constraint)
	{
		if (!empty($value)) {
			if (!preg_match($constraint->format, $value)) {
				$this->context->addViolation($constraint->message, array('%string%' => $value));
			}
		}
	}
public function validate($value, Constraint $constraint)
	{
		if (!empty($value)) {
			if (!preg_match($constraint->format, $value)) {
				$this->context->addViolation($constraint->message, array('%string%' => $value));
			}
		}
	}
{@inheritDoc} @see ConstraintValidatorInterface::validate()

@param string $value
@param Constraint $constraint