[Flow] Validation > Exception instead of going back to newAction

Carsten Bleicker carsten at bleicker.de
Fri Dec 6 11:27:53 CET 2013


hi axel, 
could you please post on gist.github.com:
1. The model youre trying to create
2. The whole form
3. The controller

thanks
carsten

Am 06.12.2013 um 11:15 schrieb Axel Wüstemann <awu at qbus.de>:

> Am 06.12.2013 11:03, schrieb Stephen Bungert:
>>> My object hast a property date. In the form I need to split the
>>> date into __date and __time.
>> 
>> Maybe you can use javascript to combine the values from your date and
>> time fields into one datetime value that your model needs? Then it
>> would have the property and it could be validated.o
> 
> I even could avoid using Flow... ;=)
> 
> In principle it is a good idea, but doesn't conform to the idea of DDD where validation rules are business rules. That's why they should be placed in the domain models.
> 
> This was one reason for me to choose Flow. This project Im working on ports an old Zend Framework application from 2009, now to Flow.
>> 
>>> The MVC base validate will not act, because ther is nor date
>>> property to validate. So it comes to the persistence valitation
>>> wich throws an exeption.
>> 
>> Have you tried validating the whole object instead of just the
>> properties? This is an annotation on the controller action not the
>> model. maybe you could then use your buildDateTime method to make
>> sure your model validates.
> 
> How to do this? I added my validation rules to the properties to be
> validated and in case of the date property I run into this issue. What
> other I could do?
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list