Holds the results of the validation of an object graph.
struct
|
ValidateResult
|
See also:
Validator
public
static
readonly
field
|
Success
|
||
type
|
ValidateResult
|
The validation errors.
public
readonly
field
|
Errors
|
||
type
|
IValidateMessage[]
|
Remarks:
This
array
will
either
be
non-empty
(validation
has
failed)
or
null
(validation
has
succeeded).
See also:
ValidateMessageType.ErrorHas the validation failed (i.e. one or more errors have occurred)?
public
property
|
HasErrors
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
the
validation
has
failed,
false
if
not. |
Have there been any messages (errors / warnings) during validation?
public
property
|
HasMessages
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
there
is
at
least
one
error
or
warning,
false
if
not. |
Have there been any warnings during validation?
public
property
|
HasWarnings
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
there
were
one
or
more
warning
messages,
false
if
not. |
The
validation
messages
(errors
and
warnings)
or
null
.
public
readonly
field
|
Messages
|
||
type
|
IValidateMessage[]
|
Remarks:
This
array
will
either
be
non-empty
(one
or
more
errors
or
warnings
are
present)
or
null
(there
are
no
errors
and
no
warnings).
See also:
ValidateMessageTypeThe
validation
warnings
or
null
.
public
readonly
field
|
Warnings
|
||
type
|
IValidateMessage[]
|
Remarks:
This
array
will
either
be
non-empty
(one
or
more
warnings
are
present)
or
null
(there
are
no
warnings).
See also:
ValidateMessageType.WarningReturns a ValidatingException exception for this validation result, assuming it has failed..
public
method
|
Throw
(string source,
string message = null)
|
||
type
|
ValidatingException
|
||
params
|
source
|
Error source tag. | |
message
|
Optional error message. | ||
returns
|
|
The ready-to-throw exception. |
public
override
method
|
ToString
()
|
||
type
|
string
|