Closed
Description
hello ... I'm using SYMFONY 2.7.3, my situation:
validation.yml
XYZ/SubjectData:
constraints:
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
fields: [client, name, regid, taxid, vatid, registerNumber]
message: client.not_unique
errorPath: regid
groups: [create, update]
creating form:
$form = $this->createForm('subject_data_type', $object, ['addClient' => false, 'addValidFrom' => true, 'submitButton' => true, 'validation_groups' => ['create']]);
- Iadd bullshit to validation fields (not mapped field) .. for example: "awegresg"
- I set form to existed data
- validation passed and SQL error occured (not unique entity)
I also see, that in UniqueEntityValidator, lines 89->91:
if ($constraint->ignoreNull && null === $criteria[$fieldName]) {
return;
}
why return ? why not continue ??