<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
                                 "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
<form-validation>

	<formset>
		<form name="formUserRegister">
			<field property="name" depends="required,maxlength">
				<arg key="general.fullName"/>
				<arg1 name="maxlength" key="${var:maxlength}"
					resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
			</field>

			<field property="login" depends="required">
				<arg key="general.login" />
			</field>
			<field property="password"
				depends="required,mask,minlength,identico">
				<arg0 key="general.password" />
				<arg1 key="userRegistrationForm.passwordConfirmation" />
				<arg1 name="minlength" key="${var:minlength}"
					resource="false" />
				<var>
					<var-name>mask</var-name>
					<var-value>^[0-9a-zA-Z]*$</var-value>
				</var>
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>
				<var>
					<var-name>secondProperty</var-name>
					<var-value>passwordConfirmation</var-value>
				</var>
			</field>
			<field property="passwordConfirmation"
				depends="required,mask,minlength">
				<arg0 key="userRegistrationForm.passwordConfirmation" />
				<arg1 name="minlength" key="${var:minlength}"
					resource="false" />
				<var>
					<var-name>mask</var-name>
					<var-value>^[0-9a-zA-Z]*$</var-value>
				</var>
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>
			</field>
			<field property="email" depends="required,email,maxlength">
				<arg key="general.email" />
				<arg1 name="maxlength" key="${var:maxlength}"
					resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
			</field>
		</form>

		<form name="userNewForm">
			<field property="name" depends="required,maxlength">
				<arg key="general.fullName" />
				<arg1 name="maxlength" key="${var:maxlength}" resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
			</field>
			
			<field property="email" depends="required,email,maxlength">
				<arg key="general.email" />
				<arg1 name="maxlength" key="${var:maxlength}" resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
			</field>
			
			<field property="userType" depends="required">
				<arg key="userRegistrationForm.userType" />
			</field>
			
			<field property="login" depends="required">
				<arg key="general.login" />
			</field>
			
			<field property="password" depends="required,mask,minlength">
				<arg0 key="general.password" />
				<arg1 name="minlength" key="${var:minlength}" resource="false" />
				<var>
					<var-name>mask</var-name>
					<var-value>^[0-9a-zA-Z]*$</var-value>
				</var>
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>
			</field>
		</form>

		<form name="editUserForm">
			<field property="name" depends="required,maxlength">
				<arg key="general.fullName" />
				<arg1 name="maxlength" key="${var:maxlength}"
					resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
			</field>
			
			<field property="cpf" depends="required">
				<arg key="editUserForm.cpf" />
			</field>
			
			<field property="email" depends="required,email,maxlength">
				<arg key="general.email" />
				<arg1 name="maxlength" key="${var:maxlength}"
					resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
			</field>
			
			<field property="city" depends="maxlength">
				<arg key="editUserForm.city"/>
				<arg1 name="maxlength" key="${var:maxlength}"
					resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
			</field>	
					
        	<field property="instituition" depends="maxlength">
        		<arg key="editUserForm.instituition" />
        		<arg1 name="maxlength" key="${var:maxlength}"
					resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
        	</field>
        	
        	<field property="description" depends="maxlength">
        		<arg key="editUserForm.description" />
        		<arg1 name="maxlength" key="${var:maxlength}"
					resource="false" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>255</var-value>
				</var>
        	</field>	
		</form>
		
		<form name="remindPasswordForm">
			<field property="email" depends="required,email">
				<arg key="remindPassword.email" />
			</field>
		</form>
		
		<form name="logonForm">
			<field property="login" depends="required">
				<arg key="general.login" />
			</field>

			<field property="password" depends="required">
				<arg key="general.password" />
			</field>
		</form>



		<form name="editPasswordForm">
			<field property="currentPassword"
				depends="required,minlength">

				<arg0 key="editPassword.currentPassword" />
				<arg1 name="minlength" key="${var:minlength}"
					resource="false" />
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>
			</field>

			<field property="newPassword"
				depends="required,minlength,identico">

				<arg0 key="editPassword.newPassword" />
				<arg1 key="editPassword.newPasswordConfirmation" />
				<arg1 name="minlength" key="${var:minlength}"
					resource="false" />
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>

				<var>
					<var-name>secondProperty</var-name>
					<var-value>newPasswordConfirmation</var-value>
				</var>
			</field>

			<field property="newPasswordConfirmation"
				depends="required,minlength">

				<arg0 key="editPassword.newPasswordConfirmation" />
				<arg1 name="minlength" key="${var:minlength}"
					resource="false" />
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>
			</field>
		</form>
	</formset>
	
	<formset>
	<form name="assistanceRequestForm">
        	<field property="degree" depends="required">
        		<arg key="requestForm.degree" />
        	</field>
        	
        	<field property="year" depends="required,mask,minlength">
        		<arg0 key="requestForm.year" />
        		<arg1 name="minlength" key="${var:minlength}" resource="false" />
        		<var>
        			<var-name>mask</var-name>
        			<var-value>^[0-9]*$</var-value>
        		</var>
        		<var>
        			<var-name>minlength</var-name>
        			<var-value>4</var-value>
        		</var>
            </field>
        	
        	<field property="instituition" depends="required">
        		<arg key="requestForm.instituition" />
        	</field>
        	
        	<field property="description" depends="required">
        		<arg key="requestForm.description" />
        	</field>
        	
        	<field property="interest" depends="required">
        		<arg key="requestForm.interest" />
        	</field>
        	<field property="courseId" depends="required">
        		<arg key="requestForm.year" />
        	</field>
		</form>
		
		<form name="teachingRequestForm">
        	<field property="degree" depends="required">
        		<arg key="requestForm.degree" />
        	</field>
        	
        	<field property="year" depends="required,mask,minlength">
        		<arg0 key="requestForm.year" />
        		<arg1 name="minlength" key="${var:minlength}" resource="false" />
        		<var>
        			<var-name>mask</var-name>
        			<var-value>^[0-9]*$</var-value>
        		</var>
        		<var>
        			<var-name>minlength</var-name>
        			<var-value>4</var-value>
        		</var>
            </field>
        	
        	<field property="instituition" depends="required">
        		<arg key="requestForm.instituition" />
        	</field>
        	
        	<field property="description" depends="required">
        		<arg key="requestForm.description" />
        	</field>
        	
        	<field property="interest" depends="required">
        		<arg key="requestForm.interest" />
        	</field>
		</form>
	</formset>


</form-validation>