Common interface for all validation errors.
kind
stringIdentifies the kind of error.
message
string | undefinedHuman readable error message.
ValidationError.WithFieldTree
interfaceValidation error with an associated field tree.
This is returned from field state, e.g., catField.errors() would be of a list of errors with
field: catField bound to state.
ValidationError.WithField
typeValidationError.WithFormField
interfaceValidation error with an associated field tree and specific form field binding.
ValidationError.WithOptionalFieldTree
interfaceValidation error with optional field.
This is generally used in places where the result might have a field.
e.g., as a result of a validateTree, or when handling form submission.
ValidationError.WithOptionalField
typeValidationError.WithoutFieldTree
interfaceValidation error with no field.
This is used to strongly enforce that fields are not allowed in validation result.
ValidationError.WithoutField
typeDescription
Common interface for all validation errors.
This can be returned from validators.
It's also used by the creation functions to create an instance
(e.g. requiredError, minError, etc.).