type

Validator

Validator checks a field before saving, after built-in checks and write hooks. 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

Related types

  • ValidationContext

    ValidationContext supplies the completed candidate to a field validator. The separate Value argument is this field's typed current value; Root and Siblings include retained update values and earlier write transformations. Prior remains the persisted enclosing object or row from before the operation. Opt-in advisory checks instead receive LiveValidationContext, whose input has not passed through defaults or save transformations.

  • Value

    Value 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.

  • Issue

    Issue 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.