A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Interface IContextValidationService

Defines the signature for the service that performs validation of model instances.

Namespace: EPiServer.Validation
Assembly: EPiServer.Framework.dll
Version: 10.10.4
Syntax
public interface IContextValidationService : IValidationService

Methods

Validate<T>(Object, T)

Validates the specified instance given specified context.

Declaration
IEnumerable<ValidationError> Validate<T>(object instance, T context)
Parameters
Type Name Description
System.Object instance

The instance.

T context

The context for the validation

Returns
Type Description
System.Collections.Generic.IEnumerable<ValidationError>
Type Parameters
Name Description
T
Remarks

This will call both IContextValidate<TInstance, TContext> instances (given that types complies to TInstance and TContext) and IValidate<T> instances (given that type comply to TInstance)

Extension Methods