method

PolymorphicRelationshipsField.LiveValidate

Add a server check that provides feedback while this field is being edited.

Arguments

ArgumentTypeDescription
valueLiveValidator[store.Value]A non-nil callback returning validation messages, or an error if the check could not run. It receives unfinished form input and must be read-only.

Returns

A new field definition with this live validator appended. Keep the returned definition; the original field is unchanged.

PolymorphicRelationshipsField

How it works

LiveValidate preserves existing live checks. It does not register a save rule; use Validate separately to enforce the rule when saving.

Full signature

Related types

  • PolymorphicRelationshipsField

    PolymorphicRelationshipsField configures links to documents from any of the target collections.

  • LiveValidator

    Check an unsaved field value on the server and return feedback before the author saves.

  • Value

    An immutable scalar, object, list, or populated document value.

Related guides