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

[validator] Declaration of Locale (language/country) in validation.xml ignored

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.0 (alpha)
    • None
    • None
    • None
    • Operating System: All
      Platform: PC

    • 16920

    Description

      As I tried to use the Validator-Plugin, I came across some really weird
      behaviors of the Validator.
      I read about setting the language and country in the validation.xml-File under
      <formset>.

      • First of all, when I tried to set another language/country than my Default-
        Locale and I start Tomcat (4.0.3), I got a NullPointerException. It seems that
        in ValidatorResources in line 334 [ Form defaultForm = get(defaultLocale,
        formKey);] he get's NULL back for the "defaultForm". And so, in the loop on
        line 336 [for (Iterator defaultFields = defaultForm.getFields().iterator();
        defaultFields.hasNext(); ) } he get's this NullPointerException.
      • Furthermore, it seems, that this setting [<formset language="something"
        country="something" >} is completely ignored by the validator. For example,
        when I set the serverlocale on US, but in the validation.xml I set
        language=German, country=CH, then there's no NullPointerException (as German,
        CH is my Default Locale), but, what's most important, it validates accordingly
        to the US-Locale (-> ignoring the language/country in the validation.xml)

      So, I'd like to know, whether this is a Bug (NullPointerException and ignoring
      the Localesettings in the validation.xml) or is deliberately implemented like
      that.
      And what's the excact use in setting the Locale in the validation.xml-File. I'd
      be glad if you could answer me as fast as possible and send me some useful
      Links on that topic.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kisseleff@gmx.ch kisseleff
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: