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

[validator] Change ValidatorUtils.getValueAsString to throw exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • Framework
    • None
    • Operating System: All
      Platform: PC

    • 16634

    Description

      If you misspell the name of a dependent property it is ignored by the validator.
      The validator uses the ValidatorUtil.getValueAsString method to get the value
      from the dependent property. The returned value is null because the property
      doesn't exist and the ValidatorUtil.getValueAsString method catches all
      exceptions (e.g. NoSuchMethodException)

      Shouldn't the validator throw a exception if a property doesn't exist? What if I
      change the name of a property and then correct the jsp but forgot to update
      validate.xml.

      Attachments

        Activity

          People

            Unassigned Unassigned
            peter@merikan.com peter merikan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: