UNPKG

@ts-fluentvalidation/core

Version:

Core library of @ts-fluentvalidation providing validations in a fluent syntax.

31 lines (30 loc) 628 B
import { Severity } from '../types/types'; /** * Represents a validation failure. */ export interface ValidationFailure { /** * Gets the name of the property that failed validation. */ propertyName: string; /** * Gets the error message. */ message: string; /** * Gets the error code. */ errorCode?: string; /** * Gets the value that was being validated. */ attemptedValue?: unknown; /** * Gets the severity of the failure. */ severity: Severity; /** * Gets the custom state of the failure. */ customState?: unknown; }