string "validators" translation domain should respect the Translator translationDomain witch can be modified through configuration (validator.translation_domain: my_custom_validation_translation_domain).
See in Translation\Extractor\Visitor\Php\Symfony\ValidationAnnotation
/**
* @param array $constraints
*/
private function extractFromConstraints(array $constraints)
{
foreach ($constraints as $constraint) {
$ref = new \ReflectionClass($constraint);
$defaultValues = $ref->getDefaultProperties();
$properties = $ref->getProperties();
foreach ($properties as $property) {
$propName = $property->getName();
// If the property ends with 'Message'
if ('message' === strtolower(substr($propName, -1 * strlen('Message')))) {
// If it is different from the default value
if ($defaultValues[$propName] !== $constraint->{$propName}) {
$this->addLocation($constraint->{$propName}, 0, null, ['domain' => 'validators']);
}
}
}
}
}
string "validators" translation domain should respect the Translator translationDomain witch can be modified through configuration (validator.translation_domain: my_custom_validation_translation_domain).
See in Translation\Extractor\Visitor\Php\Symfony\ValidationAnnotation
Not sure of the best way to do this, any idea ?