Guards to check string input's length #138
rustam-r-hajiyev
started this conversation in
Ideas
Replies: 1 comment
-
I just created an extension in my project based in your code. I only need to check for max length so I added two extensions. The second just combines the NullOrEmpty with MaxLength because I normally want to check those both at the same time. I'd love to see this get included in the main library.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
While using the library I didn't find guards that would help to ensure that string inputs are shorter than MAX and/or longer than MIN. It seems to me that these checks are quite common and it would be nice to have them in the library.
I already created a fork where I added 3 guards: MinLength, MaxLength and MinAndMaxLength: https://github.com/rustamhajiyev/GuardClauses
If you like these guards, I'd be happy to create a PR and contribute.
Beta Was this translation helpful? Give feedback.
All reactions