ValidatorProviderAttribute
NexusLabs.Needlr.Generators¶
ValidatorProviderAttribute Class¶
Marks an assembly as providing a validator base type that the Needlr analyzer should recognize.
When a type used with [Options(Validator = typeof(...))] inherits from the specified base type,
the analyzer will not report NDLRGEN014 (validator missing interface).
Inheritance System.Object 🡒 System.Attribute 🡒 ValidatorProviderAttribute
Remarks¶
This enables integration packages (like FluentValidation adapters) to teach the core analyzer about their validator types without the core needing direct knowledge of those packages.
Example usage in an extension package:
Constructors¶
ValidatorProviderAttribute(string) Constructor¶
Initializes a new instance of the ValidatorProviderAttribute class.
Parameters¶
baseTypeName System.String
The fully-qualified metadata name of the base validator type.
Properties¶
ValidatorProviderAttribute.BaseTypeName Property¶
The metadata name of the base validator type. Use backtick notation for generic types: "FluentValidation.AbstractValidator`1"