Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2236

[validator] report how many fields have been checked - i.e. make ValidatorForm.validate() fail-safe!

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.4
    • Fix Version/s: Future
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other
    • Bugzilla Id:
      31620

      Description

      as per as per Bug 31618, there seems to be a problem with looking up forms during
      validation.

      Anyway, as long as commons validator doesn't throw a ValidatorException, the
      application programmer gets the exactly same result for the case when the form
      has been properly validated and no errors have been found and the opposite case
      where due to a configuration error (or programming error in the underlying jars)
      no validation has been executed whatsoever.

      Testing for the number of fields validated as per the suggestion in the above
      referenced bug is one idea, probably there are other (better ways) to engineer this.

      in order not to have to change the interface, at least a
      log.debug(validatorResults.numbOfFieldsValidated + " fields have been validated
      in form "+ super.getClass().getName());
      in the ValidatorForm.validate() would be highly useful!, there seems to be a problem with looking up forms during
      validation.

      Anyway, as long as commons validator doesn't throw a ValidatorException, the
      application programmer gets the exactly same result for the case when the form
      has been properly validated and no errors have been found and the opposite case
      where due to a configuration error (or programming error in the underlying jars)
      no validation has been executed whatsoever.

      Testing for the number of fields validated as per the suggestion in the above
      referenced bug is one idea, probably there are other (better ways) to engineer this.

      in order not to have to change the interface, at least a
      log.debug(validatorResults.numbOfFieldsValidated + " fields have been validated
      in form "+ super.getClass().getName());
      in the ValidatorForm.validate() would be highly useful!

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hauser@acm.org Ralf Hauser
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: