mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-01 10:59:45 +00:00
Refactor validation handling in PersonEdit.vue
: Replace hasValidationError
and validationError
with hasViolation
and violationTitles
. Introduce hasViolationWithParameter
and violationTitlesWithParameter
for enhanced field validation. Update RequiredIdentifierConstraint
messages, improve API error mapping, and refine ValidationException
structure with violationsList
. Add tests and translations for identifier validation.
This commit is contained in:
@@ -106,8 +106,7 @@ final class RequiredIdentifierConstraintValidatorTest extends ConstraintValidato
|
||||
|
||||
$this->validator->validate($collection, new RequiredIdentifierConstraint());
|
||||
|
||||
$this->buildViolation('This identifier must be set')
|
||||
->atPath('property.path.identifiers')
|
||||
$this->buildViolation('person_identifier.This identifier must be set')
|
||||
->setParameter('{{ value }}', '')
|
||||
->setParameter('definition_id', '1')
|
||||
->setCode('c08b7b32-947f-11f0-8608-9b8560e9bf05')
|
||||
@@ -123,8 +122,7 @@ final class RequiredIdentifierConstraintValidatorTest extends ConstraintValidato
|
||||
|
||||
$this->validator->validate($collection, new RequiredIdentifierConstraint());
|
||||
|
||||
$this->buildViolation('This identifier must be set')
|
||||
->atPath('property.path.identifiers')
|
||||
$this->buildViolation('person_identifier.This identifier must be set')
|
||||
->setParameter('{{ value }}', ' ')
|
||||
->setParameter('definition_id', '1')
|
||||
->setCode('c08b7b32-947f-11f0-8608-9b8560e9bf05')
|
||||
|
Reference in New Issue
Block a user