Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-17257

DateValidator attachs the inputFormat on custom wrongLength parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 3.2 (Release)
    • Apache Flex 4.10.0
    • Validators
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: German

    Description

      The common known pattern for date formats in Germany looks like this:

      short date: common known: TT.MM.JJ (technical: DD.MM.YY )

      long date: common known: TT.MM.JJJJ (technical: DD.MM.YYYY)

      If you validate a date with the wrong length, the DateValidator adds a error tooltip to the source. On the end of the tooltips is the defined input format (technical pattern), but german users aren't familar the technical pattern. They would expect the non technical pattern in the error tooltip.

      In the Source code:
      The DateValidator attachs the input format to the line 271 and line 343 the error message of the ValidationResult.

      Steps to reproduce:
      1. Using the DateValidator, overwriting the error messages (wrongLengthError, formatError,.....) and overwriting the inputFormat.

      <mx:DateValidator source="

      {txtDate}

      " property="text" inputFormat="

      {resourceManager.getString('rb', 'dateFormat')}

      wrongLengthError="

      {resourceManager.getString('rb', 'wrongLengthError')}

      "/>

      2. Typing a date into the Textnput with a wrongLength

      3. Validate the input with the DateValidator

      Actual Results:

      DateValidator creates a error tooltip with the wrongLength error message + inputFormat

      Expected Results:

      DateValidator creates a error tooltip with the wrongLength error message

      If it's not possible to remove the input format be default from the error message, boolean parameter to disable this attachment would be great.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: