-
Notifications
You must be signed in to change notification settings - Fork 343
Open
Labels
common 💼Issues/PRs for the Common packageIssues/PRs for the Common packagefeature request 📬A request for new changes to improve functionalityA request for new changes to improve functionality
Description
Continuing from Currency validation support #4430.
We'd like to add an IsCurrency
extension method to StringExtensions that bundles an easy and obvious check for if a string is a valid currency, similar to IsDecimal.
This would be implemented like so
public static bool IsCurrency([NotNullWhen(true)] this string? str)
{
return decimal.TryParse(str, NumberStyles.Currency, out _);
}
Metadata
Metadata
Assignees
Labels
common 💼Issues/PRs for the Common packageIssues/PRs for the Common packagefeature request 📬A request for new changes to improve functionalityA request for new changes to improve functionality
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Added IsCurrency to StringExtensions #72