Search Results for

    Show / Hide Table of Contents

    Class ValidationContext

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Inheritance
    System.Object
    ValidationContext
    ValidationContext<T>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FastEndpoints
    Assembly: FastEndpoints.dll
    Syntax
    public class ValidationContext

    Properties

    Instance

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public static ValidationContext Instance { get; }
    Property Value
    Type Description
    ValidationContext

    ValidationFailed

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public bool ValidationFailed { get; }
    Property Value
    Type Description
    System.Boolean

    ValidationFailures

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public List<ValidationFailure> ValidationFailures { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<FluentValidation.Results.ValidationFailure>

    Methods

    AddError(ValidationFailure)

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public void AddError(ValidationFailure failure)
    Parameters
    Type Name Description
    FluentValidation.Results.ValidationFailure failure

    AddError(String, String, Severity)

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public void AddError(string message, string errorCode = null, Severity severity = Severity.Error)
    Parameters
    Type Name Description
    System.String message
    System.String errorCode
    FluentValidation.Severity severity

    ThrowError(ValidationFailure)

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public void ThrowError(ValidationFailure failure)
    Parameters
    Type Name Description
    FluentValidation.Results.ValidationFailure failure

    ThrowError(String)

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public void ThrowError(string message)
    Parameters
    Type Name Description
    System.String message

    ThrowIfAnyErrors()

    provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.

    Declaration
    public void ThrowIfAnyErrors()
    In This Article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX