Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-155

Change Locale on Validators

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2, 1.3
    • 1.3
    • None
    • None

    Description

      Unable to change the Locale used in Validators.

      For example, in TextInputValidatorTest, in the textinputFloatRange I've seen that giving inputs in the current Locale all works good, but I haven't find a way to change the Locale, or to set a different format to validators ... how can i do this ?
      Maybe the simplest thing could be to set a different Locale and let validators using it, in this case all the application would use only a Locale, but i think this is a common case (only a few times i had to manage more locales in the same application, showing more at the same time to the same user ... ). The best could be to have new settings alive without having to restart the application.

      I have to run my applications in a multi-locale environment (but any user with its default or chosen locale) ... thanks.

      As a sample, a portion of code that uses this could go for example in TextInputValidatorTest.

      Hints for the implementation:

      (1) make DecimalValidator not abstract - the reason it is currently abstract is a historical hold-over
      (2) make the DecimalValidator constructors public
      (3) modify the various *Validator classes to have extra constructors that take a Locale parameter.

      Attachments

        Activity

          People

            gbrown Gregory K. Brown
            smartini Sandro Martini
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: