WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

Add Currency validation to TextBoxExtensions

Open NaftoliOst opened this issue 4 years ago • 6 comments

Fixes #4188

Adds a currency validation option to the TextBoxExtensions

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

The Decimal validation does not allow currency signs, e.g. $ or €.

What is the new behavior?

With the Currency validation type, any valid decimal with or without currency signs will be allowed.

PR Checklist

Please check if your PR fulfills the following requirements:

  • [ ] Tested code with current supported SDKs
  • [ ] New component
    • [ ] Pull Request has been submitted to the documentation repository instructions. Link:
    • [ ] Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
    • [ ] If control, added to Visual Studio Design project
  • [ ] Sample in sample app has been added / updated (for bug fixes / features)
  • [ ] New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
  • [ ] Header has been added to all new source files (run build/UpdateHeaders.bat)
  • [x] Contains NO breaking changes

Other information

The code here could be refactored once The PR to add IsCurrency to StringExtensions gets merged.

NaftoliOst avatar Jan 25 '22 13:01 NaftoliOst

Thanks NaftoliOst for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

ghost avatar Jan 25 '22 13:01 ghost

CLA assistant check
All CLA requirements met.

net-foundation-cla[bot] avatar Jan 25 '22 13:01 net-foundation-cla[bot]

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

:x: NaftoliOst sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

net-foundation-cla[bot] avatar Jan 25 '22 13:01 net-foundation-cla[bot]

Hi @NaftoliOst , it appears you're trying to merge this code in from the main/master branch of your forked repo.

Please be aware of the rules & stipulations of submitting code into the Toolkit repo (these rules are in place due to issues we encounter when trying to merge in code from a user's main branch, into the toolkit's main branch):

image

XAML-Knight avatar Jan 27 '22 23:01 XAML-Knight

Ah, thanks for pointing that out @XAML-Knight Is it possible for me to change that on this PR or do I need to close it and open a new one?

NaftoliOst avatar Jan 28 '22 00:01 NaftoliOst

Ah, thanks for pointing that out @XAML-Knight Is it possible for me to change that on this PR or do I need to close it and open a new one?

Go ahead and open a new PR from one of your dev branches, and then we'll also close this one.

XAML-Knight avatar Jan 28 '22 00:01 XAML-Knight