[TYPO3-mvc] validating two model in a form

Desh Naik desh.naik at lelesys.com
Thu Nov 4 11:11:41 CET 2010


**hi

Can anyone help me  in validating two models in single form eg

suppose i have two table
1 ) student (id,name,age)
2) Address (student_id,city,state,pincode)


and i have a form like this

<f:form method="post" controller="Student" action="create" 
name="student" object="{student}" >
<f:form.textbox property="name" />
<f:form.textbox property="age" />
<f:form.textbox property="city" />
<f:form.textbox property="state" />
<f:form.textbox property="pincode" />
<f:form.submit class="submit" value="Create Master Template"/>
</f:form>

from this form i want to validate (name and city ) which are in two 
different model

is it possible to validate 2 fields in different model or am i doing it 
in wrong way ?

Thanks


More information about the TYPO3-project-typo3v4mvc mailing list