Commons Validator
  1. Commons Validator
  2. VALIDATOR-137

Allow validators to register errors for multiple fields

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      Struts validators explicitly pass in an ActionErrors instance to allow
      validators to record their own results. While I'm not convinced that is a good
      idea for most validations, it does allow a validator to register validation
      errors for other fields than the one currently being processed.

      For example, perhaps there was an XML schema validator to validate an XML
      element. The schema validator is going to report multiple validator errors all
      at the same time. This patch would allow that validator to register those
      errors even though Validator hasn't processed or has already processed those fields.

      The patch puts both the current Form and ValidationResults in the Validator's
      parameters allowing a validator to specify those objects to be passed in as a
      parameter during validation.

        Activity

        Don Brown created issue -
        Hide
        Don Brown added a comment -

        Created an attachment (id=11632)
        Patches in diff -u format

        Show
        Don Brown added a comment - Created an attachment (id=11632) Patches in diff -u format
        Hide
        Ted Husted added a comment -

        Thanks, Don!

        Show
        Ted Husted added a comment - Thanks, Don!
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 29151 12341469
        Henri Yandell made changes -
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s Nightly Builds [ 12311648 ]
        Project Commons [ 12310458 ] Commons Validator [ 12310494 ]
        Component/s Validator [ 12311135 ]
        Key COM-1317 VALIDATOR-137
        Henri Yandell made changes -
        Affects Version/s Nightly Builds [ 12311748 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

        Error rendering 'com.atlassian.jirafisheyeplugin:fisheye-issuepanel'. Please contact your JIRA administrators.

          People

          • Assignee:
            Unassigned
            Reporter:
            Don Brown
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development