ansys.dyna.core.lib.validators.ValidationResult#

class ansys.dyna.core.lib.validators.ValidationResult#

Result of a validation operation.

errors: List[ansys.dyna.core.pre.errors.ValidationError] = []#
warnings: List[ansys.dyna.core.pre.errors.ValidationError] = []#
info: List[ansys.dyna.core.pre.errors.ValidationError] = []#
add_error(error: ansys.dyna.core.pre.errors.ValidationError) None#

Add an error to the result.

Parameters:
errorValidationError

The validation error to add.

has_errors() bool#

Check if there are any errors.

Returns:
bool

True if there are errors, False otherwise.

has_warnings() bool#

Check if there are any warnings.

Returns:
bool

True if there are warnings, False otherwise.

property is_valid: bool#

Check if validation passed (no errors).

Returns:
bool

True if no errors, False otherwise.

get_summary() str#

Get a summary of validation results.

Returns:
str

Summary string with counts of errors, warnings, and info messages.

raise_if_errors() None#

Raise an exception if there are any errors.

Raises:
ValidationError

If there are any errors in the result.