Skip to content

ValidationResult

The result of validating inputs against a Prompty’s inputs. Returned by validate_inputs (§12.2) to indicate whether all required inputs are present and satisfy their constraints.

---
title: ValidationResult
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class ValidationResult {
        +boolean valid
        +ValidationError[] errors
    }
    class ValidationError {
        +string message
        +string property
        +string constraint
    }
    ValidationResult *-- ValidationError
valid: true
errors: []
NameTypeDescription
validbooleanWhether all inputs passed validation
errorsValidationError[]List of validation errors (empty when valid is true)

The following types are composed within ValidationResult: