Class ValidatorWrapper
Class that encapsulates an instance of IValidate<T>
Namespace: EPiServer.Validation.Internal
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public abstract class ValidatorWrapper : Object
Constructors
ValidatorWrapper()
Declaration
protected ValidatorWrapper()
Properties
ContextType
Specifies the type of context the validator is registered for
Declaration
public virtual Type ContextType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Remarks
Default value is null
EncapsulatedValidator
Gets the encapsulated validator.
Declaration
public abstract object EncapsulatedValidator { get; }
Property Value
Type | Description |
---|---|
System.Object | The encapsulated validator. |
TypeToValidate
Gets the type to validate.
Declaration
public abstract Type TypeToValidate { get; }
Property Value
Type | Description |
---|---|
System.Type | The type to validate. |
Methods
Validate(Object)
Validates the specified instance.
Declaration
public abstract IEnumerable<ValidationError> Validate(object instance)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ValidationError> |
Validate(Object, Object)
Validates the specified instance.
Declaration
public virtual IEnumerable<ValidationError> Validate(object instance, object context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
System.Object | context | The context for the validation |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ValidationError> |
Remarks
The default implementation ignores the context and calls Validate(Object)