[FLOW3-general] Flow and validation when deleting
Steffen Wickham
steffen at gaming-inc.de
Mon Feb 4 15:11:03 CET 2013
Hi Stephan,
to answer your last question: It's a feature.
As the MVC framework doesn't know what kind of action is invoked it has
to validate the model everytime. If you change your model (including
validation) you have to make sure to add missing values or you can
simply use the "@Flow\IgnoreValidation("$variable")" annotation in the
PhpDoc block before your deleteAction method. It's described in the
documation part II at
http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Validation.html
(very last example at the bottom of the page).
Greetings
Steffen
Am 04.02.2013 13:06, schrieb Stephan Vidar:
> Hi,
>
> I have a model with propertys. Later I added a validation of a
> property of a model (location).
>
> /**
> * The location
> * @var string
> * @Flow\Validate(type="NotEmpty")
> */
> protected $location;
>
> Existing records with an empty string in this property can no longer
> be deleted because the validation to fail:
>
> An error occurred while trying to call
> ...Controller\ConcertController->deleteAction(). Error for
> concert.location: This property is required.
>
> Is it a bug or a feature?
>
> Thx, Stephan
> _______________________________________________
> 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