well, 

you will have to put it in validation.xml.

for example, the masks below let you put in all numbers and letters, upper
and lowercase for username and password.  you will have to put in a mask for
your field.

<form name="Login">
  <field property="username" depends="required,mask">
    <msg name="mask" key="errors.invalid"/>
    <arg0 key="form.login.username"/>
    <var>
      <var-name>mask</var-name>
      <var-value>^[a-zA-Z0-9]*$</var-value>
    </var>
  </field>
  <field property="password" depends="required,mask">
    <msg name="mask" key="errors.invalid"/>
    <arg0 key="form.login.password"/>
    <var>
      <var-name>mask</var-name>
      <var-value>^[a-zA-Z0-9]*$</var-value>
    </var>
  </field>
</form>

-----Original Message-----
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 11:53 AM
To: Struts Users Mailing List
Subject: RE: numeric field validation using struts


Hi,
Do u have some examle of some website where i can find
information about using mask??

Ashish
--- "Pani, Gourav" <[EMAIL PROTECTED]>
wrote:
> couldn't you use a mask to do this?
> 
> -----Original Message-----
> From: Ashish Kulkarni
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 20, 2003 11:48 AM
> To: [EMAIL PROTECTED]
> Subject: numeric field validation using struts
> 
> 
> Hi,
> 
> Has any one done inut validation of numeric fields
> in
> struts, like i want to validate number of digits
> after
> decimal or lenght of the numeric field
> like the valid valus will be 123.34, but 1234.4 is
> in
> valid,
> I am using dynavalidatorform , so would like some
> code
> to put in validation.xml or in strutsvalidator
> 
> does any one have this kind of validation code,
> 
> Ashish
> 
> =====
> A$HI$H
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=====
A$HI$H

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to