rama chandrula wrote:
Hi,
I have a text box in which I can either enter a E-mail address or the
Phone number.
I want to use Struts-Validator for validating the format of both the
email and phone number.
How can I specify the values of both the masks for the same text box.
In the snippet given below, contactID is used to refer the email
address. Is the following correct ?
<form name="myForm">
<field property="addContactID"
depends="mask">
<arg0 key="prompt.contactID"/>
<arg1 key="error.invalid.contactID"/>
<var>
<var-name>mask</var-name>
<var-value>(${contactID})|(${phoneNumber})</var-value>
</var>
</field>
</form>
<var-value> should contain a regular expression. I'm not sure what
${contactID} and ${phoneNumber} are, but you need to replace them with
the appropriate regular expressions.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]