Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-24

Javascript validation doesn't work if a form field is called "name"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • None
    • Operating System: Windows XP
      Platform: PC

    • 27899

    Description

      The last commit of the javascript code allows multiple forms on the same page
      by generating a unique variable name based on form name, adding this line

      oMinLength = eval('new ' + form.name + '_minlength()');

      But if any field of the form is called "name" javascript validation doesn't
      work as form.name is an object, not a String

      For example <html:text property="name"/> makes client side validation stop
      working

      Affected files:
      Jakarta-commons/validator/src/javascript/org/apache/commons/validator/javasc
      ript/*.js

      Attachments

        Activity

          People

            Unassigned Unassigned
            carlos Carlos Sanchez Gonzalez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: