🔍 Analyzers

EasyValidate Analyzers

Compile-time analyzers to help you write better validation code with real-time feedback and best practices enforcement

19

Total Analyzers

14

Errors

5

Warnings

0

Info

12

Code Fixers

Chain Validation: 4Conditional Validation: 5Context: 1Design: 3Inheritance: 2Setup: 1Type Safety: 1Usage: 2
Error
EASY001
Attribute Must Inherit From System.Attribute
Validation attribute must inherit from System.Attribute. Custom validation attributes must properly extend the attribute hierarchy.
Inheritance

Example

ErrorFix Available
EASY002
Attribute Must Have Proper AttributeUsage
Validation attribute must have proper AttributeUsage attribute configured for properties, fields, or parameters.
Design

Example

ErrorFix Available
EASY003
Validation Attribute Must Implement IValidationAttribute<T>
Validation attribute must implement IValidationAttribute<T> to be recognized by the source generator.
Design

Example

Error
EASY004
DivisibleBy Divisor Cannot Be Zero
The divisor passed to 'DivisibleByAttribute' cannot be zero as it would cause a division by zero error.
Usage

Example

Error
EASY005
PowerOf Value Must Be Greater Than One
The value passed to 'PowerOfAttribute' must be greater than 1 for meaningful power validation.
Usage

Example

Error
EASY006
Collection Element Type Mismatch
The element passed to collection attributes must match the property's element type.
Type Safety

Example

WarningFix Available
EASY007
Duplicate Chain Name
Multiple validation attributes with the same chain name found on a single member. Each chain should have unique attributes.
Chain Validation

Example

WarningFix Available
EASY008
Validation Chain Needs Reordering
Validation chain attributes need reordering to ensure proper type flow between transforming validators.
Chain Validation

Example

WarningFix Available
EASY009
Chain Needs NotNull Injection
Validation chain needs NotNull attribute injection to handle nullable types properly.
Chain Validation

Example

Error
EASY010
Incompatible Chain Types
Validation chain has incompatible types. The output type of one validator doesn't match the input type of the next.
Chain Validation

Example

ErrorFix Available
EASY011
Conditional Method Is Missing
The conditional method specified in ConditionalMethod property is missing from the containing class.
Conditional Validation

Example

ErrorFix Available
EASY012
Conditional Method Invalid Parameter Count
Conditional method must accept exactly zero or one parameter of type IChainResult.
Conditional Validation

Example

ErrorFix Available
EASY013
Conditional Method Parameter Type Mismatch
Conditional method's first parameter must be of type IChainResult.
Conditional Validation

Example

ErrorFix Available
EASY014
Conditional Method Return Type Mismatch
Conditional method must return bool or ValueTask<bool>.
Conditional Validation

Example

ErrorFix Available
EASY015
Invalid Conditional Method Name
Conditional method name is not a valid C# method identifier.
Conditional Validation

Example

ErrorFix Available
EASY016
Missing Required Validation Type
Class is missing required validation type(s) - must implement IGenerate interface.
Setup

Example

Warning
EASY017
ValidationContext Property Diagnostic
Issues with ValidationContext property configuration in custom attributes.
Context

Example

WarningFix Available
EASY018
Public Method Can Cause Confusion
Public method with validation attributes can cause confusion in validation processing. Consider making it private or internal.
Design

Example

Error
EASY019
Conflicting Base Class Inheritance
Containing class inherits another class and is required to inherit a specific base class for validation.
Inheritance

Example