Uploaded image for project: 'Stripes'
  1. STS-783

Improve euro currency handling on NumberTypeConverterSupport

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: Release 1.5.4
    • Fix versions: Release 1.5.5, Release 1.6
    • Components: Validation
    • Labels:
      None
    • Sprint:

      Description

      When you have bound a text tag to a number property, and have added a formatType="currency" attribute on that tag, submitting that form will result in a validation error.

      This is because the stripes formatter will add a white space between the euro symbol and the number, for example € 20000,00.
      The formatter does NOT do this with for example the dollar symbol ($20000.00). I am not sure if this extra white space applies to the euro symbol only, i have only tried euro and dollar currencies.

      When parsing, the preprocess method on NumberTypeConverterSupport will remove the (euro) currency symbol, but not the extra white space, resulting in the validation error later on.

      Right now i have to extend the BigIntegerTypeConverter (my currency properties are all BigInteger) in order to trim the output of the preprocess method, so that the white space gets removed once the currency symbol is gone. Then i can drop my cusomt converter in a extension package and it all works, but it would be nice if also euro currency can work out of the box.

        Attachments

          Activity

            People

            • Assignee:
              bengunter BenB
              Reporter:
              tunedbeats tunedbeats
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: