Attribute-Based Data Validation in .NET

Posted by Phil Weber on January 7, 2003

This is very cool: Assign attributes (e.g., NotEmpty, MaxLength) to Class fields, then validate them with a single method call. Wish I'd thought of it!


Comments

Posted by Mark Hurd on January 23, 2003:

I haven’t cut code to use the output of xsd.exe, which comes with the .NET SDK, but the code it produces seems to do some of this already.

Of course you need a xsd defining your data first…


Leave a comment