a few minor changes
This commit is contained in:
parent
ff4d446c5e
commit
59c4f55290
@ -47,18 +47,17 @@ class FormValidator extends ConstraintValidator
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* @var FormInterface $form */
|
/* @var FormInterface $form */
|
||||||
|
|
||||||
$path = $this->context->getPropertyPath();
|
|
||||||
$graphWalker = $this->context->getGraphWalker();
|
|
||||||
$groups = $this->getValidationGroups($form);
|
|
||||||
$config = $form->getConfig();
|
$config = $form->getConfig();
|
||||||
|
|
||||||
if (!empty($path)) {
|
|
||||||
$path .= '.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($form->isSynchronized()) {
|
if ($form->isSynchronized()) {
|
||||||
// Validate the form data only if transformation succeeded
|
// Validate the form data only if transformation succeeded
|
||||||
|
$path = $this->context->getPropertyPath();
|
||||||
|
$graphWalker = $this->context->getGraphWalker();
|
||||||
|
$groups = $this->getValidationGroups($form);
|
||||||
|
|
||||||
|
if (!empty($path)) {
|
||||||
|
$path .= '.';
|
||||||
|
}
|
||||||
|
|
||||||
// Validate the data against its own constraints
|
// Validate the data against its own constraints
|
||||||
if (self::allowDataWalking($form)) {
|
if (self::allowDataWalking($form)) {
|
||||||
|
@ -58,7 +58,7 @@ class MappingRule
|
|||||||
*
|
*
|
||||||
* @param string $propertyPath The property path to match against the rule.
|
* @param string $propertyPath The property path to match against the rule.
|
||||||
*
|
*
|
||||||
* @return Boolean|FormInterface The mapped form or false.
|
* @return null|FormInterface The mapped form or null.
|
||||||
*/
|
*/
|
||||||
public function match($propertyPath)
|
public function match($propertyPath)
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ class MappingRule
|
|||||||
return $this->getTarget();
|
return $this->getTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -164,7 +164,7 @@ class ViolationMapper implements ViolationMapperInterface
|
|||||||
/* @var MappingRule $rule */
|
/* @var MappingRule $rule */
|
||||||
|
|
||||||
// Mapping rule matches completely, terminate.
|
// Mapping rule matches completely, terminate.
|
||||||
if (false !== ($form = $rule->match($chunk))) {
|
if (null !== ($form = $rule->match($chunk))) {
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user