[TYPO3-mvc] Make some model validation optional

Stefan Kruse besucher80 at gmx.de
Wed Mar 20 10:38:32 CET 2013


Hi, 

unfortunately this is not quite what I'm looking for. So I have a
registration form for which I created a model. I lay there for properties
the validators e.g. NotEmpty etc. In the front end the entries are validated
and definitely there has to be something entered. In the backend, it should
be the admin left alone if he enters or what not. So that means I have to
somehow manage turn off the validators or delete from the validator array.
That's why I thought of the initializeAction. There, I check if I'm in the
TYPO3 BE mode. Just like I can now access the validators for my fields and
delete this? There must be a method by which I can get all the registered
validators or? But how? 
Thanks Stefan



Message: 8
Date: Mon, 18 Mar 2013 16:48:28 +0100
From: Kay Strobach <typo3 at kay-strobach.de>
Subject: Re: [TYPO3-mvc] Make some Model Properties optional
To: typo3-project-typo3v4mvc at lists.typo3.org
Message-ID:
	
<mailman.1.1363621708.24854.typo3-project-typo3v4mvc at lists.typo3.org>
Content-Type: text/plain; charset=ISO-8859-1

Hello Stefan,

you may use sth. like:

function name($param1, $param2='default', ...)

Regards
Kay

Am 18.03.13 16:02, schrieb Stefan Kruse:
> Hi,
> 
>  
> 
> its me again. J
> 
> I have an idea. Is it possible to overwrite in a initializeAction the 
> Object properties and setRequired(FALSE)?
> 
> When yes how did I come on the properties from my argument and how to 
> set them? Has somebody a tipp how to do this out of my initialize action?
> 
>  
> 
> Regards and thanks for every tipp.
> 
>  
> 
> Stefan
> 



More information about the TYPO3-project-typo3v4mvc mailing list