Monday, April 8, 2013

Improved compiletime supported validators

After a the initial post on the compile-time supporting webform validators, a few itches started to surface. Mainly the extendability and cleanliness. With some slight changes it was possible to categorize the validators (thus enforcing more of the Single Responsibility Principle).


The following code demonstrates the usage of this API. Note that there are breaking changes if you are replacing the previous version.
protected override void OnInit(EventArgs e)

Read the original post for implementation details.