Unosquare
    Show / Hide Table of Contents

    Class ObjectValidationResult

    Defines a validation result containing all validation errors and their properties.

    Inheritance
    Object
    ObjectValidationResult
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Swan.Validators
    Syntax
    public class ObjectValidationResult

    Properties

    Errors

    A list of errors.

    Declaration
    public IReadOnlyList<ObjectValidationResult.ValidationError> Errors { get; }
    Property Value
    Type Description
    IReadOnlyList<ObjectValidationResult.ValidationError>

    IsValid

    true if there are no errors; otherwise, false.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Add(String, String)

    Adds an error with a specified property name.

    Declaration
    public void Add(string propertyName, string errorMessage)
    Parameters
    Type Name Description
    String propertyName

    The property name.

    String errorMessage

    The error message.

    Comments

    Back to top Copyright © 2017-2019 Unosquare