cs-util-com / cscore

cscore is a minimal-footprint library providing commonly used helpers & patterns for your C# projects. It can be used in both pure C# and Unity projects.
https://cs-util-com.github.io/cscore/
Apache License 2.0
197 stars 32 forks source link

Regex based data validation #11

Closed cs-util closed 4 years ago

cs-util commented 5 years ago

Annotating a data model class with fancy regex annotations that are then validated whenever the setter of a property is used and which throws an error or logs an assertion if the regex matching fails is what I had initially in mind but maybe not relying on magic via annotations but instead doing it first only via plain validation method calls would be a better and more flexible start

cs-util commented 4 years ago

This is now possible using the RegexValidator.cs