November Happy Hour will be moved to Thursday December 5th.

Class ValidatorWrapper

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Class that encapsulates an instance of IValidate<T>

Inheritance
System.Object
ValidatorWrapper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Validation.Internal
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public abstract class ValidatorWrapper

Constructors

ValidatorWrapper()

Declaration
protected ValidatorWrapper()

Properties

ContextType

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the encapsulated validator.

Declaration
public abstract object EncapsulatedValidator { get; }
Property Value
Type Description
System.Object

The encapsulated validator.

TypeToValidate

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the type to validate.

Declaration
public abstract Type TypeToValidate { get; }
Property Value
Type Description
System.Type

The type to validate.

Methods

Validate(Object)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)

Extension Methods