My enums have a value of None, which means that a value has not been selected yet. None should never be saved to database.
enum MyEnum
{
None = 0,
SomeValue = 1,
...
}
Is there a way I can use Data annotation RegularExpression in such a way that validation should fail if None value is selected?
You’ll have a better chance with a
[Range(SomeValue, LastValue)]constraint.