Table of Contents

Class DataAnnotationsWorkflowValidator<T>

Namespace
WorkflowForge.Extensions.Validation
Assembly
WorkflowForge.Extensions.Validation.dll

Validates data using System.ComponentModel.DataAnnotations attributes.

public sealed class DataAnnotationsWorkflowValidator<T> : IWorkflowValidator<T>

Type Parameters

T

The type of data to validate.

Inheritance
DataAnnotationsWorkflowValidator<T>
Implements
Inherited Members

Methods

ValidateAsync(T, CancellationToken)

Validates the specified data using DataAnnotations.

public Task<ValidationResult> ValidateAsync(T data, CancellationToken cancellationToken = default)

Parameters

data T

The data to validate.

cancellationToken CancellationToken

Optional cancellation token.

Returns

Task<ValidationResult>

A task representing the validation result.