struct

Cl8r::IPAM::ValidationResult

Inherits Struct < Value < Object

Encapsulates all validation errors and warnings detected in a cluster definition.

Constructors

new(errors : Array(ValidationError) = [] of ValidationError, warnings : Array(ValidationWarning) = [] of ValidationWarning)

Initializes a ValidationResult container.

Source

Instance methods

add_error(code : String, message : String, target : String = "") : Nil

Adds a new validation error to the result.

Source
add_warning(code : String, message : String, target : String = "") : Nil

Adds a new validation warning to the result.

Source
errors
Source
valid?

Returns true if no validation errors were encountered.

Source
warnings
Source