[FLOW3-general] Problem with validation

Martin titusmailing at googlemail.com
Tue Apr 10 14:48:38 CEST 2012


Dear List,

I am trying to implement standard validation. But th eobject is still 
created without any errors. I manly followed the Blog example on the 
Definite Guide an on the git repository.

Can someone give me a clue what is wrong or if I have to enable 
validation. I recreated the Database and emptied the cache severaltimes...

Thanx alot!

Martin

My Model with:

	/**
	 * The theme
	 * @var string
	 * @FLOW3\Validate(type="StringLength", options={ "minimum"=1, 
"maximum"=200 })
	 * @ORM\Column(length=200)
	 */
	protected $theme;

in the Model.

In the view I am having:

<f:form action="create" name="newSeminar" object="{newSeminar}" 
enctype="multipart/form-data">


and my renderings:

<f:render partial="FormErrors" arguments="{for: 'newSeminar'}" />

The Partial looks like:


<f:form.validationResults for="{for}">
	<f:if condition="{validationResults.flattenedErrors}">
		<dl class="errors">
			<f:for each="{validationResults.flattenedErrors}" key="propertyPath" 
as="errors">
				<dt>
					{propertyPath}:
				</dt>
				<dd>
					<f:for each="{errors}" as="error">{error}</f:for>
				</dd>
			</f:for>
		</dl>
	</f:if>
</f:form.validationResults>



More information about the FLOW3-general mailing list