Skip to content

Commit

Permalink
Use built-in UniqueEntity Validator
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Dec 20, 2023
1 parent 41ff50c commit fd33614
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 99 deletions.
3 changes: 2 additions & 1 deletion config/validator/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ App\Entity\Alias:
maxLength: 24

App\Entity\Domain:
constraints:
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: name
properties:
name:
- NotNull: ~
- NotBlank: ~
- App\Validator\Constraints\Domain: ~

App\Entity\User:
properties:
Expand Down
1 change: 0 additions & 1 deletion default_translations/de/validators.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ form:
werden.
registration-recovery-token-noack: Dieses Feld muss ausgewählt werden.
invalid-token: Der Code hat ein ungültiges Format.
already-exists: "Existiert bereits."

registration:
voucher-invalid: Der Einladungscode ist ungültig.
Expand Down
1 change: 0 additions & 1 deletion default_translations/en/validators.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ form:
invalid-token: "This token has an invalid format."
twofactor-secret-invalid: "The verification code is not valid."
twofactor-backup-ack-missing: "This needs to be checked."
already-exists: "Already exists."

registration:
voucher-invalid: "The invite code is invalid."
Expand Down
9 changes: 0 additions & 9 deletions src/Validator/Constraints/Domain.php

This file was deleted.

31 changes: 0 additions & 31 deletions src/Validator/Constraints/DomainValidator.php

This file was deleted.

56 changes: 0 additions & 56 deletions tests/Validator/Constraints/DomainValidatorTest.php

This file was deleted.

0 comments on commit fd33614

Please sign in to comment.