Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LengthOutOfRange #327

Closed
ardalis opened this issue Dec 18, 2023 · 3 comments
Closed

LengthOutOfRange #327

ardalis opened this issue Dec 18, 2023 · 3 comments
Assignees

Comments

@ardalis
Copy link
Owner

ardalis commented Dec 18, 2023

Add a string guard that supports both a min and max length of the string.

Guard.Against.LengthOutOfRange("abc", 2, 4); // passes
Guard.Against.LengthOutOfRange("a", 2, 4); // throws
Guard.Against.LengthOutOfRange("abcde", 2, 4); // throws
@HamidRezaAshkiyan
Copy link
Contributor

Hi Ardalis,
Can I work on this?

@ardalis
Copy link
Owner Author

ardalis commented Dec 24, 2023

All yours; sorry I missed your toolong implementation yesterday.

@HamidRezaAshkiyan
Copy link
Contributor

Thanks, also I've refactored the implementation to use other guardCluases and be smaller.
Please let me know if anything needs to improve or change.

@ardalis ardalis closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants