Replies: 1 comment 1 reply
-
Answered as a part of the #169. A new issue will be created. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello again :)
While working on #168, I noticed that NullOrEmpty and NullOrWhiteSpace are not passing the custom message to the Null check and only use it for the empty/white-space check.
While thinking if this is an issue, I thought that there may be a use case where the custom message is usually only applicable to the empty/white-space check.
However, when I tried to use the API, I was normally setting the custom message so that it covers both cases. E.g.:
Guard.Against.NullOrWhiteSpace(something, "something", "Null, empty or white space are prohibited.");
.The final error message would look like this:
Null, empty, or white space are prohibited. (Parameter 'something')
Is the current implementation intentional or should it be improved?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions