[TYPO3-50-general] RFC: Validation Refactoring

Martin Kutschker masi-no at spam-typo3.org
Wed Sep 16 12:23:19 CEST 2009


Sebastian Kurfürst schrieb:
> Hey everybody,
> 
> There are still some questions we need to discuss about:
> - Do we want recursive validation? e.g. in case you submit a Blog which
> contains a _new_ post object, the post needs to be validated
> automatically as well.
> However, we'd need to make sure that only newly submitted fields get
> validated...

You are talking currently very HTML form centric. What if the data is
loaded via some RPC (eg AJAX, SOAP, XML-RPC) or the CLI (eg a file data
import script)?

> - Do we automatically want to build validations from the @var
> annotations in the model, checking that the values are of the
> appropriate type (integer, string, ...)?

At what point are strings coming from a form converted to the model's
data types? *

Masi

* I have some bad experience with NuSOAP. When I create a WSDL that
expects an integer value it converts the input data with PHP's
functions. This means the input "123abc" becomes 123. Argh! Type
checking of numbers must be done with a regexp manually before
converting the value to int/float.


More information about the TYPO3-project-5_0-general mailing list