struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-2943) Validation is not appling for comma separated number entered in text field which has property type integer
Date Fri, 02 Jan 2009 05:41:37 GMT
Validation is not appling for comma separated number entered in text field which has property
 type integer
-----------------------------------------------------------------------------------------------------------

                 Key: WW-2943
                 URL: https://issues.apache.org/struts/browse/WW-2943
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.6
         Environment: Win xp
            Reporter: Srinivas


Hi

we are using the struts2.0.6 framework as part of our business application .Recently we found
that there is a validation issue with struts2 frame work. Let me explain my problem first.

In our jsp page i have defined a s:text field and the field property is integer type(defined
in bean).Now if i enter the string value in text filed now submit the form , then the struts2
frame work shows the validation error for the string because the property of type Integer.
This is right behavior . But if i enter the integer value with comma separated i.e 1,2,3 in
text box now submit the form then the struts2 frame work converting the comma separated integer
value into normal integer number that means struts frame work strips(removes) the commas form
the given number and does not throwing any error.

Now my questiong is how to validate the integer value which has the commas . Is there any
solution for this? Basicallay we dont want to provide our coustom validation for this fieled
because if we do so then we have to apply this validation througout application around 150
places.

Is there any common place to provide validation or is struts2 already provide any solution
for this? in which file(struts2 code base ) can we provide the our own validation for the
text field which will apply for all text fields.

your pointers are very help full

thanks in advance.

Srinivas

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message