Emit a warning for a type whose members have validation attributes, but the type itself does not have the [Validate] attribute AND it does not implement the IValidationTarget<T> interface, thus making all the validation attributes useless.
Example code for which a warning would be raised:
// note the missing [Validate] and IValidationTarget<Query>
public class Query
{
[Immediate.Validations.Shared.GreaterThan(0)]
public int Value { get; set; }
}
Having only one of [Validate] or IValidationTarget<T> raises a warning about the other, so that's not a concern.
Emit a warning for a type whose members have validation attributes, but the type itself does not have the
[Validate]
attribute AND it does not implement theIValidationTarget<T>
interface, thus making all the validation attributes useless.Example code for which a warning would be raised:
Having only one of
[Validate]
orIValidationTarget<T>
raises a warning about the other, so that's not a concern.