PasswordValidator - why does IsUpper and IsLower methods checks only latin characters
See original GitHub issueSummary
When checking if password contains upper/lower characters it only checks for ‘A-Z’/‘a-z’. It’s not useful as other non-latin characters can be used in password.
Motivation and goals
Imporve PasswordValidator usage with non-latin symbols
Risks / unknowns
It’s a breaking change
Detailed design
IsUpper
method should use Char.IsUpper
method, and IsLower should use Char.IsLower
methods
Issue Analytics
- State:
- Created 4 months ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Regex for password must contain at least eight characters ...
I want a regular expression to check that: A password contains at least eight characters, including at least one number and includes both...
Read more >string isupper() and islower() methods with examples
Python isupper() and islower() are in-built methods in Python, that are used to check if a string is in uppercase or lowercase.
Read more >isupper(), islower(), lower(), upper() in Python and their ...
This method returns True if all characters in the string are uppercase, otherwise, returns “False”. It returns “True” for whitespaces but if ...
Read more >Python string.isupper() Method (With Examples)
The isupper() method checks whether all the characters of a given string are uppercase or not. It returns True if all characters are...
Read more >Problems with isupper & islower function - C++ Forum
I'm working on a password validator program and I can't understand why it continues to crash. Visual studio throws a debug assertion failed....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for helping out with this, @martincostello 👍
I found this SO answer and it’s working fine
Because
TryAddScoped
is used, service is registered only if it wasn’t registered https://github.com/dotnet/aspnetcore/blob/d919168952ac4da33be8532c6980547a783a7389/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs#L89