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-107) [validator] Only validate rendered form fields
Date Wed, 19 Jul 2006 14:06:16 GMT
     [ http://issues.apache.org/jira/browse/VALIDATOR-107?page=all ]

Niall Pemberton resolved VALIDATOR-107.
---------------------------------------

    Fix Version/s: 1.3.0 Release
       Resolution: Duplicate

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

> [validator] Only validate rendered form fields
> ----------------------------------------------
>
>                 Key: VALIDATOR-107
>                 URL: http://issues.apache.org/jira/browse/VALIDATOR-107
>             Project: Commons Validator
>          Issue Type: Improvement
>    Affects Versions: Nightly Builds
>         Environment: Operating System: Windows XP
> Platform: PC
>            Reporter: Rachel Vanderboom
>            Priority: Minor
>             Fix For: 1.3.0 Release
>
>
> All the Javascript validation functions, like validateRequired, do not check to
> see if the field that is being validated actually exists on the form.  In other
> words, they do not do a null check.  I know you may be thinking that if the
> field is null, then there should be no validation done on that field.  However,
> I have many pages that have one or more fields that may or may not be rendered
> on the page based on whom is logged in.  If they are rendered, then they must be
> validated; if not, then they obviously do not need to be validated.  So
> basically, I had to change the javascript functions to ignore fields that are
> null so they will be validated if they exist and ignored if they do not.  The
> current code throws a javascript error if they field does not exist.  This seems
> like a bug to me.  Basically, all I do is the following in the looping of the
> validated fields, after the field is declared:
> if (field == null) {
>   continue;
> }

-- 
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