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

[Validator] Search the locale 'hierarchy' of formsets for a Form

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 37310

    Description

      Currently if a formset for a specific locale is specified, but a form is not
      found in that formset then Validator doesn't currently check less specific
      formsets.

      For Example, given the following config...

      <form-validation>
      <formset language="fr">
      <form name="myForm">
      ...
      </form>
      <form name="otherForm">
      ...
      </form>
      </formset>

      <formset language="fr" country="CA">
      <form name="otherForm">
      ...
      </form>
      </formset>
      </form-validation>

      ... then calling ValidatorResources's getForm() method with a locale of
      Locale.CANADA_FRENCH and form name of "myForm" returns null - rather than
      returning the form named "myForm" defined in the <formset language="fr">
      formset.

      I found this after looking into the following question from Wolfgang Gehner...

      "I have a question though. If I don't use the language parameter on the formset
      (which is what you suggested), as in language="fr", it will tell me that
      formset for locale "fr" is not found. Do you think I am doing something wrong?"

      Attachments

        Activity

          People

            Unassigned Unassigned
            niallp Niall Pemberton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: