struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mallik <malli...@yahoo.com>
Subject Adding another form fields to validator.xml problem
Date Tue, 12 Sep 2006 06:37:22 GMT

HI friends 
i am using validator framework  for client side validations in my web
application 
i added login page validations in validator.xml file , it working fine

the problem starts when i added another collegeForm fields,
if i added atleast one field like id 
the server saying that no service for the path you requesting.........
why this is?
this is my validator.xml file...........
--------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!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="LoginForm">
		<field property="userId" depends="required,minlength,maxlength,mask">
		<arg0 key="label.userId" />
				<var>
					<var-name>mask</var-name>
					<var-value>^[0-9a-zA-Z_]*$</var-value>
				</var>
				<arg1 key="${var:minlength}" name="minlength" resource="false" />
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>
				<arg2 key="${var:maxlength}" name="maxlength" resource="false"/>
				<var>
					<var-name>maxlength</var-name>
					<var-value>10</var-value>
				</var>
			</field>
			<field property="password" depends="required,minlength,maxlength,mask">
				<arg0 key="label.password"/>
				
				<var>
					<var-name>mask</var-name>
					<var-value>^[0-9a-zA-Z_]*$</var-value>
				</var>
				<arg1 key="${var:minlength}" name="minlength" resource="false" />
				<var>
					<var-name>minlength</var-name>
					<var-value>4</var-value>
				</var>
				<arg2 key="${var:maxlength}" name="maxlength" resource="false"/>
				<var>
					<var-name>maxlength</var-name>
					<var-value>10</var-value>
				</var>
			</field>
		</form>
		
	</formset>
	<formset>
		<form name="collegeForm">
			<field property="id" depends="required">
				<arg0 key="label.id"/>
			</field>
		</form>
	</formset>
</form-validation>

code in struts-config.xml is 
----------------------------------------------------
<form-bean name="collegeForm"
type="org.apache.struts.validator.DynaValidatorForm">
			<form-property name="id" type="java.lang.String"/>
			<form-property name="name" type="java.lang.String"/>
			<form-property name="collegeShortDesc" type="java.lang.String"/>
			<form-property name="principal" type="java.lang.String"/>
			<form-property name="address" type="java.lang.String"/>
			<form-property name="city" type="java.lang.String"/>
			<form-property name="state" type="java.lang.String"/>
			<form-property name="pincode" type="java.lang.String"/>
			<form-property name="mobile" type="java.lang.String"/>
			<form-property name="phoneNo1" type="java.lang.String"/>
			<form-property name="phoneNo2" type="java.lang.String"/>
			<form-property name="emailId" type="java.lang.String"/>
			<form-property name="fax" type="java.lang.String"/>
</form-bean>


this is my form field
----------------------------------
<html:text property="id" styleClass="formtextmid"/>
like i added for all that form fields

please let me know the reason why? or where i went worng
ur's
Mallik
-- 
View this message in context: http://www.nabble.com/Adding-another-form-fields-to-validator.xml-problem-tf2256969.html#a6260393
Sent from the Struts - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message