@open-formulieren/types
    Preparing search index...

    Interface StrictComponentSchema<T>

    Define a strict variant of Form.io's ComponentSchema interface.

    This schema refines Form.io's (too loose) schema. It applies to most of the component types we support.

    We also exclude 'multiple' here to force people to explicitly opt-in through the MultipleCapable for components that support it.

    interface StrictComponentSchema<T> {
        clearOnHide?: boolean;
        conditional?: OFConditionalOptions;
        defaultValue?: T;
        description?: string;
        disabled?: boolean;
        errors?: Object;
        hidden?: boolean;
        hideLabel?: boolean;
        id: string;
        key: string;
        label: string;
        placeholder?: string;
        tooltip?: string;
        type: string;
        validateOn?: "blur" | "change";
    }

    Type Parameters

    • T

    Hierarchy

    • Omit<ComponentSchema<T>, UnusedFormioProperties | "multiple">
      • StrictComponentSchema
    Index

    Properties

    clearOnHide?: boolean

    If the value of this field should be cleared when it is conditionally hidden.

    conditional?: OFConditionalOptions

    Dynamically determines if the component is visible/available.

    defaultValue?: T

    The default value of this compoennt.

    description?: string
    disabled?: boolean
    errors?: Object

    Allows customizable errors to be displayed for each component when an error occurs. This is an object with the following keys: required min max minLength maxLength invalid_email invalid_date pattern custom

    An object (keys listed above), values are the strings you wish to display. Each string has the {{ field }} to use within the string. Example. {"required": "{{ field }} is required. Try again."}

    hidden?: boolean

    Determines if the component should be within the form, but not visible. This can be overridden with the conditionals.

    hideLabel?: boolean
    id: string
    key: string

    The data key for this component (how the data is stored in the database, referenced as API key in docs).

    label: string

    The HTML label to give this component.

    placeholder?: string

    The input placeholder for this component.

    tooltip?: string
    type: string

    The type of component

    validateOn?: "blur" | "change"

    This will perform the validation on either "change" or "blur" of the input element.