The Context Object β
The context object is the single source of truth passed to multiple functions as arguments and as slot scopes. It contains everything VueForm knows about the current state bundled into a neat, opinionated object.
{
isNewItem: Boolean,
fields: Array,
normalizedFields: Array,
values: Object,
dirtyValues: Object,
error: Object,
itemId: String,
isReading: Boolean,
isCreating: Boolean,
isUpdating: Boolean,
isDeleting: Boolean,
isArchiving: Boolean,
isLoading: Boolean,
isArchived: Boolean,
touched: Array,
dirty: Array,
}isNewItem β
true when the form is in create mode, false when editing an existing item.
fields β
The original field configuration array passed to the <VueForm>.
normalizedFields β
Processed field configuration with defaults applied and internal transformations.
values β
Current form values as key-value pairs. Updates reactively as users input data.
dirtyValues β
Only the fields that have been modified since the form loaded or last saved.
error β
Validation and API errors formatted by errorAdaptor. Contains field-specific error messages.
itemId β
The unique identifier of the item being edited.
isReading β
true while the read method is fetching data on mount.
isCreating β
true while the create method is executing after clicking the <VueFormCreate> button.
isUpdating β
true while the update method is executing after clicking the <VueFormUpdate> button.
isDeleting β
true while the delete method is executing. Used with <VueFormDelete> button.
isArchiving β
true while the archive method is executing. Used with <VueFormArchive> button.
isLoading β
true when any async operation is in progress (reading, creating, updating, deleting, or archiving).
isArchived β
true if the current item has been marked as archived.
touched β
Array tracking which fields have been focused or interacted with by the user.
dirty β
Array tracking which fields have been modified from their initial values.