Skip to content

Commit

Permalink
Add dependency comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Fortunier committed Jan 3, 2024
1 parent 376a0d3 commit 300d4b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Validator/Constraints/EmailChainValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function validate($value, Constraint $constraint): void
$validator = Validation::createValidator();
foreach ($emailToValidate as $email) {
// MDT add strict mode https://github.com/symfony/symfony/issues/35307
// Need egulias/email-validator dependency for use in strict mode
$violations = $validator->validate(trim($email), [new Email(['mode' => Email::VALIDATION_MODE_STRICT])]);
if ($violations->count() > 0 || trim($email) === '') {
$this->context->buildViolation($constraint->message)->addViolation();
Expand Down
1 change: 1 addition & 0 deletions src/Validator/Constraints/FileRequiredOnNewValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function validate($value, Constraint $constraint): void
}

$object = $this->context->getObject();
// Need symfony/form dependency
if ($object instanceof FormInterface) { // MDT adjust if use the contraints from collection
$object = $object->getParent()->getData();
}
Expand Down

0 comments on commit 300d4b1

Please sign in to comment.