IValidationContext Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Constrained interface used to provide context to rule implementation
public interface IValidationContext
type IValidationContext = interface
Public Interface IValidationContext
- Derived
Properties
PathString |
Pointer to source of validation error in document |
Methods
AddError(OpenApiValidatorError) |
Register an error with the validation context. |
AddWarning(OpenApiValidatorWarning) |
Register a warning with the validation context. |
Enter(String) |
Allow Rule to indicate validation error occured at a deeper context level. |
Exit() |
Exit from path context elevel. Enter and Exit calls should be matched. |
Extension Methods
CreateError(IValidationContext, String, String) |
Helper method to simplify validation rules |
CreateWarning(IValidationContext, String, String) |
Helper method to simplify validation rules |