Skip to content

Interface: DefineGroupBaseOptions<Schema, Children, ActiveKeys, Deps> ​

Defined in: core/src/definitions/define-group.ts:96

Options of defineGroup and defineGroupWithDeps. When schema is a function of the dependencies, write it before the callbacks, or they see none of its keys.

Type Parameters ​

Type Parameter
Schema
Children
ActiveKeys extends PropertyKey
Deps

Properties ​

PropertyModifierTypeDescriptionDefined in
activeWhen?readonlyActiveWhenOptions<Schema, ActiveKeys, Deps>When each listed child takes part, decided by a getter of the group's own draft. An inactive child is not validated and stays out of the output, and its value is kept.core/src/definitions/define-group.ts:108
children?readonlyChildrenThe group's children: keys with a definition of their own, each with its own schema, rules and output. The keys of schema are nodes too, but not children; they take their rules from the group.core/src/definitions/define-group.ts:103
mode?readonlyValidationModeWhen errors become visible inside this group. Overrides the form's mode.core/src/definitions/define-group.ts:114
reValidateMode?readonlyReValidateModeWhen errors inside this group update after a node that contains them is submitted. Overrides the form's reValidateMode.core/src/definitions/define-group.ts:119
schema?readonlySchemaOption<Schema, Deps>The group's own keys, as a Standard Schema or a function of the dependencies. A key is here or in children.core/src/definitions/define-group.ts:98
validate?readonly(context) => ValidateResultA rule across the group's values, children included. Error paths are relative to the group.core/src/definitions/define-group.ts:110
validateAsync?readonlyAsyncValidationOptions<{ [Key in string | number | symbol]: (OwnOutput<Schema> & { -readonly [Key in string | number | symbol]: OutputOf<Children[Key]> } & { -readonly [Key in string | number | symbol]?: OutputOf<Children[Key]> })[Key] }, Deps>A check against something outside the form, run on the group's output.core/src/definitions/define-group.ts:112

Released under the MIT License.