We have an existing custom class that inherits from ValidationAttribute. This class does some basic validation on enum property values on our c# data model classes.
The constructor for the attribute class takes a Type parameter that is intended to match the type of the field that the attribute is applied to.
I would like to get the type of the field that has the attribute on it without having to pass it in as a parameter to the attribute.
Is this something that can be done easily?