Francisco Diaz Trepat - gmail wrote:
> 
> Although I think maybe there are some validators we would all use like
> those
> already included in wicket.
> 

nonzero positive: NumberValidator.minimum(1)
nonzero negative: NumberValidator.maximum(-1)
nonzero positive or negative: do as Gwyn suggested. If you insist on using a
pre-built
validator, try PatternValidator("[+|-]?(\\d)*[1-9](\\d)*") but then the
model has to
be a String, not a number.


-----
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
-- 
View this message in context: 
http://www.nabble.com/Validating-a-NonZero-Values-and-Validators-Project-in-General-tf4609372.html#a13172551
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to