public function validate($value, Constraint $constraint)
{
if (!preg_match('/^[a-f0-9]{32}$/', $value, $matches)) {
// If you're using the new 2.5 validation API (you probably are!)
$this->context->buildViolation($constraint->message)->setParameter('%string%', $value)->addViolation();
}
}