EnumDefinedValidator Checked-in

Topics: Development Team Discussion, User Discussion
Sep 16, 2007 at 5:51 PM
Edited Sep 16, 2007 at 5:52 PM
I've added an EnumDefinedValidator, its related Attribute, Data and Design Node.

It validates a given Enum value is within the range of the Enum's defined values.

I also updated the DefaultValidators which makes it useful for pre-condition validation

public enum Bar

public void Func(Bar bar)
ArgumentValidation.Validate("bar", bar, DefaultValidators.EnumDefinedValidator);

or with PIAB

public void Func([EnumDefinedValidator] Bar bar)