Closed Sacharkin closed 3 years ago
Hey Sacharkin,
unfortunately, I have to disagree with you on the HTML assertion for the following reasons:
In general, if you have to parse something, then it's not a good fit for Light.GuardClauses. Just parse it and check if the corresponding parser throws an exception or reports any other kinds of errors.
Regarding the URL: there already are assertions that validate URIs. I would suggest you create an URI instance and then use one of the assertions.
Does this fit your needs?
BTW, there already was a similar issue regarding JSON: https://github.com/feO2x/Light.GuardClauses/issues/68
Maybe you want to read it, too.
I understand the reasons to not implements this issue. Can be closed. Thanks 👍🏻
No worries! Thanks for your suggestions.
Actually I start to use this framework to validate/guard my properties. But I do not finde a implementation to check HTML content or URLs, this would be nice. Prefer to use something like:
value.MustBeHtml()
value.MustBeUrl()