struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjeewa Saman" <sanjee...@mubasher.net>
Subject RE: expression validator
Date Fri, 29 Feb 2008 11:05:42 GMT
Hi, 
You can override the default functionality and use , create the
validator.xml such that is can compare strings.

Refer the following site ,
http://struts2issues.blogspot.com/ 

this will give a complete idea of doing it.

Thanks .

-----Original Message-----
From: mojoRising [mailto:jpiser@averoinc.com] 
Sent: Friday, February 29, 2008 4:16 AM
To: user@struts.apache.org
Subject: Re: expression validator


Thanks, I confirmed my syntax, and now it does not do any client side
validation. Do I have this validator in the right place? Here is the
relevant code from my xml file:


<!DOCTYPE validators PUBLIC
        "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
        "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">

<validators>
 	<field name="password">
        <field-validator type="requiredstring">
            <message key="requiredstring"/>
        </field-validator>
    </field>
	<field name="password2">
        <field-validator type="requiredstring">
            <message key="requiredstring"/>
        </field-validator>			
    </field>
	
	<validator type="expression"> 
			  password2.equals(password) 
			  <message>Password not the same as
Confirmed</message> 
	</validator>	

</validators>




>From the validator documentation.

  <validator type="expression">
      email.equals(email2)
      <message>Email not the same as email2</message>
  </validator>

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications


-- 
View this message in context:
http://www.nabble.com/expression-validator-tp15746472p15747878.html
Sent from the Struts - User mailing list archive at Nabble.com.


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




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


Mime
View raw message