You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Sura, Bhupesh" <Bh...@us.widerthan.com> on 2008/05/30 02:13:26 UTC

Regexp validation

I am using tapestry 5.0.10 and I have a code in a .tml file which looks like this.

<input t:id="ipAddress" t:type="TextField" t:validate="regexp=([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3<blocked::file://.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3/>}" />

No matter what input string I give, the regex validation is failing. The regex is valid and works fine with my java code.

Any help would be greatly appreciated.

Re: Regexp validation

Posted by Brian Long <bl...@annadaletech.com>.
Sura,

take a look at this example here

http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html

you'll have to put your regular expression in your classes properties 
file for it to work . . .

/Brian.

Sura, Bhupesh wrote:
> I am using tapestry 5.0.10 and I have a code in a .tml file which looks like this.
>
> <input t:id="ipAddress" t:type="TextField" t:validate="regexp=([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3<blocked::file://.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3/>}" />
>
> No matter what input string I give, the regex validation is failing. The regex is valid and works fine with my java code.
>
> Any help would be greatly appreciated.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Regexp validation

Posted by Mikaël Cluseau <mc...@gmail.com>.
Try to change your "\\" to "\".

Le jeudi 29 mai 2008 à 20:13 -0400, Sura, Bhupesh a écrit :
> I am using tapestry 5.0.10 and I have a code in a .tml file which looks like this.
> 
> <input t:id="ipAddress" t:type="TextField" t:validate="regexp=([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3<blocked::file://.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3/>}" />
> 
> No matter what input string I give, the regex validation is failing. The regex is valid and works fine with my java code.
> 
> Any help would be greatly appreciated.
-- 
  .~.
  /V\      Mikaël Cluseau <mc...@isi.nc>
 // \\
/(   )\    ISI.NC             +687 26.93.18
 ^`~'^


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org