Package 

Object ZecStringExt

    • Method Detail

      • filterContinuous

         final Boolean filterContinuous(Context context, MonetarySeparators separators, String zecString)

        Builds filter with current local monetary separators for continuous input checking. The solution is built upon regex validation and other common string validation checks.

        Regex example: ^(0-9(0-9+(,$|0-9+))(.$|0-9+)?)?$ Inputs may differ according to user locale.

        Valid amounts: "" . | .123 | 123, | 123. | 123,456 | 123.456 | 123,456.789 | 123,456,789 | 123,456,789.123 | etc. Invalid amounts: 123,, | 123,. | 123.. | ,123 | 123.456.789 | etc.

        Note that this validation handles locales with the same grouping and decimal separators, which might be required in some rare cases.

        Parameters:
        context - used for loading localized pattern from strings.
        separators - which consist of localized monetary separators
        zecString - to be validated
      • checkFor3Digits

         final Boolean checkFor3Digits(MonetarySeparators separators, String zecString)

        Checks for at least 3 digits between grouping separators.

        Parameters:
        separators - which consist of localized monetary separators
        zecString - to be validated
      • filterConfirm

         final Boolean filterConfirm(Context context, MonetarySeparators separators, String zecString)

        Builds filter with current local monetary separators for validation of entered ZEC amount after confirm button is pressed. The solution is built upon regex validation and other common string validation checks.

        Regex example: ^(0-9{1,3}(?:,?0-9{3}))(?:0-90-9)?$ Inputs may differ according to user locale.

        Valid amounts: 123 | .123 | 123. | 123, | 123.456 | 123,456 | 123,456.789 | 123,456,789 | 123,456,789.123 | etc. Invalid amounts: "" | , | . | 123,, | 123,. | 123.. | ,123 | 123.456.789 | etc.

        Note that this validation handles locales with the same grouping and decimal separators, which might be required in some rare cases.

        Parameters:
        context - used for loading localized pattern from strings.
        separators - which consist of localized monetary separators
        zecString - to be validated