#46462UniquenessValidator for models
Description
I am currently writing a UniquenessValidator and I wanted to publish this here, maybe someone has an Idea about functionalities and features. I also want to check if such a validator would be welcome in the core or not. Simple thing: It checks if there is already a value for that column available, usable for e.g. login-names, email-addresses etc. My thoughts so far:
Basic validator:
/** * @validate Uniqueness */ protected $email;
Scoped checking, like: Each account can only have one user with that email-address, but the user can be there multiple times for different accounts.
/** * @validates Uniqueness(scope=user) */ protected $email;
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 13
-
Anja Leichsenring commented 03/22/13, 08:50
-
Alexander Schnitzler changed target version 04/23/13, 23:35
-
Anja Leichsenring changed target version 05/31/13, 15:28
-
Alexander Opitz changed project id category target version 09/24/14, 11:03
-
Mathias Schreiber changed target version 12/23/14, 19:46
-
Benni Mack changed target version 06/15/15, 17:44
-
Susanne Moog changed target version 08/05/15, 10:28
-
Benni Mack changed target version 09/24/15, 08:31
-
Benni Mack commented and changed status
NewNeeds Feedback 04/01/16, 20:48Pascal, care to implement that? Would be awesome!
-
Alexander Opitz changed status
Needs FeedbackNew 09/28/16, 10:50 -
Riccardo De Contardi changed target version 02/23/17, 14:49
-
Susanne Moog changed target version 01/28/18, 14:29
-
Christian Kuhn commented and changed status
NewClosed 02/19/22, 10:07Hey. I’m going to close this feature request for now: This issue is open since 10 years and nobody ever worked on it. It seems as if the pressure to have such an validator in the core isn’t very high.
In case anyone wants to pick it up again, it can happen with an new issue.
Flow has something similar, backport should be considered: https://forge.typo3.org/projects/package-typo3-flow3/repository/revisions/7ee3832c0769511f6804bafd9f770d4b6c1e322e