type
Validator
Validator checks a field before saving, after built-in checks and write hooks. Root and Siblings include retained values and earlier write transformations; Prior remains the persisted enclosing object or row. LiveValidationContext instead describes sparse input before defaults and save transformations. Return issues for values the author needs to fix, or an error if the check could not run. An issue belongs to this field unless its Target names a child.
Full signature
type Validator[T any] func(
operation.Context,
operation.Value[T],
) ([]operation.Issue, error)Related types
ContextContext describes one field callback at its current lifecycle phase. Root, Siblings and Prior are detached, immutable snapshots of field values; document metadata such as ID is available separately on Context. A callback changes its own value only through its return value.
ValueValue carries an optional logical value. Its zero value is empty. For raw input, empty means omitted and Present(store.Null()) means explicit null. For typed scalars, empty is the portable empty state, not a durable absence encoding. T must follow its own ownership contract; this carrier does not deep-clone arbitrary mutable application values.
IssueIssue addresses the current field or a descendant relative to its candidate value. A zero Target selects the current field. Ridu supplies resource, field, locale, display-path and stable correlation information; callbacks never construct occurrence IDs.