commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (VALIDATOR-73) [validator] validateRequired.js uses unsupported DOM method for validation.
Date Wed, 19 Jul 2006 14:12:14 GMT
     [ http://issues.apache.org/jira/browse/VALIDATOR-73?page=all ]

Niall Pemberton resolved VALIDATOR-73.
--------------------------------------

    Fix Version/s: 1.2.0 Release
       Resolution: Fixed

Re-openned and the set to "Resolved Fixed" again to correct "resolution" which was lost in
Bugzilla --> JIRA conversion

> [validator] validateRequired.js uses unsupported DOM method for validation.
> ---------------------------------------------------------------------------
>
>                 Key: VALIDATOR-73
>                 URL: http://issues.apache.org/jira/browse/VALIDATOR-73
>             Project: Commons Validator
>          Issue Type: Bug
>         Environment: Operating System: All
> Platform: All
>            Reporter: Dave Seleno
>             Fix For: 1.2.0 Release
>
>         Attachments: patchIE5.diff, validateRequired-getAttribute.patch
>
>
> validateRequired() method relies on the DOM method document.getAttributeNode()
> for retrieving a form's "name" attribute value. document.getAttributeNode() is
> not supported by Internet Explorer 5.5 or earlier and breaks the validation
> routine. Patch uses better supported document.getAttribute().
> Note: While this patch is for validateRequired.js only,
> document.getAttributeNode() is also present in:
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateFloatRange.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateShort.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMinLength.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateDate.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateEmail.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateByte.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMask.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateCreditCard.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateInteger.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMaxLength.js
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateFloat.js
> Index:
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateRequired.js,v
> retrieving revision 1.13
> diff -u -r1.13 validateRequired.js
> ---
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
>      28 Mar 2004 16:53:21 -0000   1.13
> +++
> ./jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
>      4 Oct 2004 22:00:58 -0000
> @@ -12,9 +12,9 @@
>          var focusField = null;
>          var i = 0;
>          var fields = new Array();
> -        var formName = form.getAttributeNode("name");
> +        var formName = form.getAttribute("name");
> -        oRequired = eval('new ' + formName.value + '_required()');
> +        oRequired = eval('new ' + formName + '_required()');
>          for (x in oRequired) {
>              var field = form[oRequired[x][0]];

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message