Skip to main content

ValidationErrorInfo

The ValidationErrorInfo class represents detailed information about validation errors, including error codes, messages, and other optional constraints.

Properties

NameDescription
MemberNameSpecifies the name of the member associated with the validation error.
MinValueMinimum value constraint relevant to the validation error, if applicable.
MessageContains the error message describing the validation error.
MaxValueMaximum value constraint relevant to the validation error, if applicable.
CodeRepresents the error code associated with the validation error.

Constructors

NameDescription
ValidationErrorInfo(message)Initializes a new instance of the ValidationErrorInfo class with a specified error message.
ValidationErrorInfo(message, memberName)Initializes a new instance of the ValidationErrorInfo class with a specified error message.
ValidationErrorInfo()Initializes a new instance of the ValidationErrorInfo class.
ValidationErrorInfo(code, message, memberName)Initializes a new instance of the ValidationErrorInfo class with a specified error message.

Methods

NameDescription
Equals(obj)Determines whether the specified object is equal to the current ValidationErrorInfo instance. Overrides Equals from Object.
ToString()Returns a string representation of the validation error information, including code, message, and member name.
GetHashCode()Returns a hash code for the current ValidationErrorInfo instance. Overrides GetHashCode from Object.