struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19542] New: - Radio-button groups aren't properly validated in the validation-rules.xml
Date Fri, 02 May 2003 08:05:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19542>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19542

Radio-button groups aren't properly validated in the validation-rules.xml

           Summary: Radio-button groups aren't properly validated in the
                    validation-rules.xml
           Product: Struts
           Version: 1.1 RC1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validator Framework
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: marc.uijterwijk@ibridge.nl


When you have a button-group of two radio-buttons, with the same name. 
And then validating on required for the name. The type of the field is 
undefined because this is actually an array. And the value is also undefined.
In this case you first have to check which radio-button is checked and the 
retrieve the value of that radio-button.

Example: two-radio button (male, female with name= gender)
var field = form[oRequired[x][0]];
The field is now an array of two radio-buttons
field[0].value is "male"
field[1].value is "female"

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


Mime
View raw message