You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ravi_eze <ra...@ivycomptech.com> on 2008/06/10 20:01:25 UTC

required Int validator -How to.

hi,

I see that the previous valid int value is being populated when i enter null
in an integer text field. I want to show error in such a case. Any ideas how
to get this done. 

The scenario is as follows:

1. When i enter no value in F1: i get validation error asking me to fill the
field
2. now i enter a valid a valid integer but some other field (F2) an
incorrect value. The page caomes back as expected. 
3. NOw if i remove data from F1 and give correct value in F2 i see no
validation error fired up. Debugging shows that Struts is returning me the
old valid value of F1(int field)
4. if i give some string/ char in int field its throwing errors as expected.

any help ???

cheers,
ravi 
-- 
View this message in context: http://www.nabble.com/required-Int-validator--How-to.-tp17761272p17761272.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: required Int validator -How to.

Posted by Laurie Harper <la...@holoweb.net>.
ravi_eze wrote:
> hi,
> 
> I see that the previous valid int value is being populated when i enter null
> in an integer text field. I want to show error in such a case. Any ideas how
> to get this done. 
> 
> The scenario is as follows:
> 
> 1. When i enter no value in F1: i get validation error asking me to fill the
> field
> 2. now i enter a valid a valid integer but some other field (F2) an
> incorrect value. The page caomes back as expected. 
> 3. NOw if i remove data from F1 and give correct value in F2 i see no
> validation error fired up. Debugging shows that Struts is returning me the
> old valid value of F1(int field)
> 4. if i give some string/ char in int field its throwing errors as expected.
> 
> any help ???

Not without knowing what version of Struts you're using, since the 
specifics are quite different between S1 and S2. It would also be useful 
to include relevant configuration and code snippets, since that might 
make it easy to zero in on the problem.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org