Commons Validator
  1. Commons Validator
  2. VALIDATOR-148

[validator] Client-side validation fails if not all form-fields are specified on page

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.1 (alpha)
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

      Description

      If you have form that has three fields: username, password, firstName.

      in form.jsp - you only specify username, password as fields.
      in validation.xml - you specify that username, password and firstName are all
      required fields.

      Client side/javascript validation will not "kick in" - all fields must be in the
      JSP. It'd be cool if this wasn't a requirement.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Resolved Resolved Closed Closed
        1768d 5h 15m 1 Henri Yandell 12/Nov/07 19:25
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Affects Version/s 1.1.1 [ 12311688 ]
        Henri Yandell made changes -
        Assignee Struts Developer Mailing List [ dev@struts.apache.org ]
        Key COM-329 VALIDATOR-148
        Project Commons [ 12310458 ] Commons Validator [ 12310494 ]
        Affects Version/s 1.1.1 [ 12311675 ]
        Component/s Validator [ 12311135 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 15912 12340480
        Hide
        Don Brown added a comment -

        Fixed by modifying static required validator javascript. Thanks Matt!

        Show
        Don Brown added a comment - Fixed by modifying static required validator javascript. Thanks Matt!
        Hide
        Don Brown added a comment -

        Reassigning to commons-validator as the fix is in its static javascript required
        validator code...

        Show
        Don Brown added a comment - Reassigning to commons-validator as the fix is in its static javascript required validator code...
        Hide
        David Graham added a comment -

        Reopening...

        Show
        David Graham added a comment - Reopening...
        Hide
        David Graham added a comment -

        Ah, that's an important point you left out of the original request . I agree that consistency is a
        good thing so I'm reopening. I still think it's silly to require fields that aren't on the form but
        do understand how this may happen.

        Show
        David Graham added a comment - Ah, that's an important point you left out of the original request . I agree that consistency is a good thing so I'm reopening. I still think it's silly to require fields that aren't on the form but do understand how this may happen.
        Hide
        Matt Raible added a comment -

        The only reason I opened this bug is because server side validation still works
        perfectly. I think that server-side and client-side validation should work in a
        consistent fashion.

        Show
        Matt Raible added a comment - The only reason I opened this bug is because server side validation still works perfectly. I think that server-side and client-side validation should work in a consistent fashion.
        Hide
        David Graham added a comment -

        This doesn't make sense to me. You define 3 fields as required and then don't include those 3 fields
        on the form? Validator should not be expected to determine which fields are really required and
        which aren't.

        Show
        David Graham added a comment - This doesn't make sense to me. You define 3 fields as required and then don't include those 3 fields on the form? Validator should not be expected to determine which fields are really required and which aren't.
        Matt Raible created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Matt Raible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development