do not apply the Valid constraint on scalar form data
This commit is contained in:
parent
41b9457887
commit
453bb3ebde
@ -110,7 +110,9 @@ class FormValidator extends ConstraintValidator
|
|||||||
foreach ($constraints as $constraint) {
|
foreach ($constraints as $constraint) {
|
||||||
// For the "Valid" constraint, validate the data in all groups
|
// For the "Valid" constraint, validate the data in all groups
|
||||||
if ($constraint instanceof Valid) {
|
if ($constraint instanceof Valid) {
|
||||||
|
if (\is_object($data)) {
|
||||||
$validator->atPath('data')->validate($data, $constraint, $groups);
|
$validator->atPath('data')->validate($data, $constraint, $groups);
|
||||||
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user