Thanks Bart, Yes, what you said was right, so I have changed \ to \\ to match \. But still I am unable to allow \n in my Validation.
Regards, Sahil Gupta -----Original Message----- From: Bart Busschots [mailto:[EMAIL PROTECTED] Sent: Thursday, March 30, 2006 3:39 PM To: Struts Users Mailing List Subject: Re: Struts Validation OK, so your Regular expression is trying to match everything between the start (^) and the end ($) of your input and no where in it do you allow a new line character, hence it is failing. You need to allow \n in which ever part of the RE you are happy to have new lines appear in. At a guess I'd say you probably want them in the second character class. What I do also notice is that you seem to have some un-escaped special characters in your second character class. The most obvious one is a single \, that will not match \, to match \ you need \\. Hope that helps, Bart. Sahil Gupta wrote: >Here is an example of the mask that I am using. > > <field property="notes" depends="mask,maxlength"> > <arg0 key="label.approval.notes"/> > <msg name="mask" >key="message.mask.displayname" /> > <var> > <var-name>mask</var-name> > ><var-value>^[a-zA-Z]{1}[a-zA-Z0-9_,;?!;:[EMAIL PROTECTED]/\()&$%#*+= >-]*$</var-value> > </var> > <arg1 name="maxlength" key="${var:maxlength}" >resource="false"/> > <var> > <var-name>maxlength</var-name> > <var-value>250</var-value> > </var> > > </field> > > >Regards, > >Sahil Gupta > > >-----Original Message----- >From: Bart Busschots [mailto:[EMAIL PROTECTED] >Sent: Thursday, March 30, 2006 2:54 PM >To: Struts Users Mailing List >Subject: Re: Struts Validation > >Can you show us the mask you currently use and then we will have a >better chance of being able to help. > >Bart. > >Sahil Gupta wrote: > > > >>Hi, >> >>I have used Masking in Validations. I have a text area in which I have >>only restricted some special characters. But still if I press Enter >>while adding some text there I get an error message. >> >>Can anyone tell me how to allow ENTER in mask. >> >>Thanks >> >>Regards, >> >>Sahil Gupta >> >>Extn : 233 >>Email : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >>****************************************************************** >>NetEdge Computing Global Solutions Private Limited. >>A-14, Sector-7, NOIDA U.P. 201-301 >>Tel # 91-120-2423281, 2423282 >>Fax # 91-120-2423279 >>URL http//www.netedgecomputing.com >>****************************************************************** >>This message may contain confidential and/or privileged information. >>If you are not the addressee or authorized to receive this for the >>addressee, you must not use, copy, disclose or take any action based >>on this message or any information herein. If you have received this >>message in error, please advise the sender immediately by reply e-mail >>and delete this message. Thank you for your cooperation. >> >> >> >> >> >> > > >--------------------------------------------------------------------- >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] > > > > --------------------------------------------------------------------- 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]