Interface IContextValidate<TInstance, TContext>
Defines the signature for a component that validates instances of TInstance
.
Namespace: EPiServer.Validation
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public interface IContextValidate<TInstance, TContext> : IValidate
Type Parameters
Name | Description |
---|---|
TInstance | Type to validate |
TContext | The context for the validation |
Remarks
This validator will only be called when Validate<T>(Object, T) is called. A validator implemeting IValidate<T> will be called regardless of context and also when Validate(Object) is called.
Methods
Validate(TInstance, TContext)
Validates the specified instance given specified context
Declaration
IEnumerable<ValidationError> Validate(TInstance instance, TContext context)
Parameters
Type | Name | Description |
---|---|---|
TInstance | instance | The instance that is validate |
TContext | context | The context for the validation |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ValidationError> | A list of validation errors or empty list if instance is valid |