[FLOW3-general] Validate if an object is unique
Manfred Rutschmann - VOLUMEN Werbe-/Internetagentur
rutschmann at agentur-volumen.de
Thu Feb 28 10:58:00 CET 2013
Hi Cornel,
i have the same problem. For this way you can`t catch the given Excpetion. For this case i have to use a little check in the controller:
$checkIdentity = $this->countryRepository->findByName($country->getName())->count();
Dirty but effective ;-)
Regards Manfred
Am 27.02.2013 um 19:09 schrieb Widmer Cornel <cornel at kollerinternet.ch>:
> In my application it is possible to create new users. The e-mail adress is used as identifier for the username (account). When I create a new user over the form with an existing e-mail flow throws the error: "Integrity constraint violation: 1062 Duplicate entry".
>
> How can I validate this?
>
> I tried to validate on the controller-action with "UniqueEntity" but then i got the error: "The object supplied for the UniqueEntityValidator must have at least one identity property."
>
> Is there a way on the model to achive this?
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list