Re: T5: built-in numeric validator

2011-03-31 Thread Adam Zimowski
> I'm wondering what lead you to believe it would be automatically Because if I define a TextField bound to numeric property without any validation of my own whatsoever, Tapestry will validate non-numeric input for me. Adam On Thu, Mar 31, 2011 at 1:24 PM, Chris Norris wrote: > Now I'm all curi

Re: T5: built-in numeric validator

2011-03-31 Thread Chris Norris
Now I'm all curious. After looking through FieldValidatorDefaultSource, FieldValidatorSource and the ValidationContstraintGenerator implementations, I'm not sure how a numeric field would automatically be validated as such. The Regexp validator is only reference in TapestryModule, which allows you

Re: T5: built-in numeric validator

2011-03-31 Thread Adam Zimowski
:) I don't think I'm in position to teach Tapestry to others, I'm still learning myself But, using Eclipse I looked at class hierarchy for: org.apache.tapestry5.AbstractValidator and see that Tapestry provides only the following out of the box: Email, Max, MaxLength, Min, MinLength, None, Re

Re: T5: built-in numeric validator

2011-03-31 Thread Chris Norris
Well perhaps you can teach me a few things. I'm trying to figure out by what mechanism tapestry would be validating this. We generally specify our custom NumericValidator on numeric fields. Is there some sort of automatic validation that can occur? I don't see much mention of it on this page: http:

Re: T5: built-in numeric validator

2011-03-31 Thread Adam Zimowski
No problem. Howard mentioned this may be a Tapestry bug. I'm in no immediate rush as my project isn't going live until next year, so hopefully by then it gets fixed. Adam On Thu, Mar 31, 2011 at 10:51 AM, Chris Norris wrote: > Sorry, I was completely wrong. I was looking at a NumericValidator >

Re: T5: built-in numeric validator

2011-03-31 Thread Chris Norris
Sorry, I was completely wrong. I was looking at a NumericValidator that we wrote, not a Tapestry one. On Thu, Mar 31, 2011 at 9:43 AM, Adam Zimowski wrote: > My client side validation is disabled. This happens on my shopping > cart page where I have multiple forms (inside a loop) with indexed > t

Re: T5: built-in numeric validator

2011-03-31 Thread Adam Zimowski
My client side validation is disabled. This happens on my shopping cart page where I have multiple forms (inside a loop) with indexed trackers ( Map. You can find complete code for the ShoppingCart page which exhibits this behavior in another thread which I posted recently: "T5: form validation wi

Re: T5: built-in numeric validator

2011-03-31 Thread Chris Norris
The Tapestry NumericValidator seems to rely on whether Double.valueOf(String) will throw an exception, which it does for '1k'. How are you configuring and using your validator? On Tue, Mar 29, 2011 at 5:19 PM, Adam Zimowski wrote: > It is server side. Looks like if input starts with a digit, Tap

Re: T5: built-in numeric validator

2011-03-29 Thread Adam Zimowski
It is server side. Looks like if input starts with a digit, Tapestry is happy :) Adam On Tue, Mar 29, 2011 at 5:05 PM, Howard Lewis Ship wrote: > Seems like a bug to me!  Surprising, though. Is this server-side or > client-side validation? > > On Tue, Mar 29, 2011 at 2:49 PM, Adam Zimowski wrot

Re: T5: built-in numeric validator

2011-03-29 Thread Howard Lewis Ship
Seems like a bug to me! Surprising, though. Is this server-side or client-side validation? On Tue, Mar 29, 2011 at 2:49 PM, Adam Zimowski wrote: > For numeric fields, Tapestry validates correctly non-numeric input. > However, input such as: > > 1k > 1\ > etc.. > > passes the validation. > > Am I