Re: Tapestry Regexp Validator

2012-05-18 Thread Taha Siddiqi
Just use int or long. Translators will take care of the leading zero. On May 18, 2012, at 6:02 PM, Fight Ice wrote: > > So I can't use int type for the field which uses the regexp. > Could anyone give me some advices for this case? > ---

RE: Tapestry Regexp Validator

2012-05-18 Thread Fight Ice
So I can't use int type for the field which uses the regexp. Could anyone give me some advices for this case?

RE: Tapestry Regexp Validator

2012-05-18 Thread Fight Ice
Solved! In my java file: @Property private int productAmount; The "productAmount" is int type. So the regexp validator doesn't works. Thanks a lot Taha! This case confused me. Why and how this happened?

Re: Tapestry Regexp Validator

2012-05-18 Thread Taha Siddiqi
I just created a page Template Java Page import org.apache.tapestry5.annotations.Property; public class TestPage { @Property private String email; } Properties file productAmount-regexp=^[1-9][0-9]* and it works :) regards Taha On Ma

RE: Tapestry Regexp Validator

2012-05-18 Thread Fight Ice
^[1-9][0-9]* or ^[1-9]\\d* still doesn't work. > Subject: Re: Tapestry Regexp Validator > From: tawus.tapes...@gmail.com > Date: Fri, 18 May 2012 14:12:14 +0530 > To: users@tapestry.apache.org > > Your regular expression indicates that productionAmount should be 1-9. Is

Re: Tapestry Regexp Validator

2012-05-18 Thread Taha Siddiqi
Your regular expression indicates that productionAmount should be 1-9. Is that so ? if it is a number not starting with zero shouldn't it be ^[1-9][0-9]* or ^[1-9]\\d* On May 18, 2012, at 1:55 PM, Fight Ice wrote: > > in template file: > > t:validate="required,regexp,min=1" t:type="t

RE: Tapestry Regexp Validator

2012-05-18 Thread Fight Ice
productAmount-regexp=^[1-9][0-9]* > Subject: Re: Tapestry Regexp Validator > From: tawus.tapes...@gmail.com > Date: Fri, 18 May 2012 13:43:28 +0530 > To: users@tapestry.apache.org > > > Can you share the code ? > > > On May 18, 2012, at 1:28 PM, Fight Ice wro

RE: Tapestry Regexp Validator

2012-05-18 Thread Fight Ice
in template file: in properties file: productAmount-regexp=^[1-9] The product amount can't start with zero. > From: ricr...@hotmail.com > To: users@tapestry.apache.org > Subject: Tapestry Regexp Validator > Date: Fri, 18 May 2012 15:58:12 +0800 > > > Tapestry 5.3.

Re: Tapestry Regexp Validator

2012-05-18 Thread Taha Siddiqi
Can you share the code ? On May 18, 2012, at 1:28 PM, Fight Ice wrote: > > Tapestry 5.3.2: > I try to use Email validator in my email input field, but it doesn't work. > Then I use the regexp validator in my properties file like this: > email-regexp=^[a-zA-Z0-9_\-]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0