FormValidationRule: {
    fields: string[];
    label: string;
    steps?: string[];
    type: "atLeastOneRequired";
} | {
    conditionValues: {
        [index: string]: string | number;
    };
    fields: string[];
    label: string;
    steps?: string[];
    type: "conditionallyRequired";
} | {
    att: string;
    fields: string[];
    label: string;
    steps?: string[];
    type: "reqAttsIfExistingAttVal";
    vals: (string | number)[];
}

Type declaration

  • fields: string[]

    field names (kind) this rule applies to

  • label: string

    internal label used in references to this rule

  • Optional steps?: string[]

    the steps this rule is restricted to (all steps when not defined)

  • type: "atLeastOneRequired"

    at least one of the fields should be defined, as if a required rule was used on it

Type declaration

  • conditionValues: {
        [index: string]: string | number;
    }

    Map of field (kind) to value used as condition for applying this rule

    • [index: string]: string | number
  • fields: string[]

    field names (kind) this rule applies to; these are required if conditionValues matches

  • label: string

    internal label used in references to this rule

  • Optional steps?: string[]

    the steps this rule is restricted to (all steps when not defined)

  • type: "conditionallyRequired"

    if indicator/condition fields have the provided values, all listed fields are required

Type declaration

  • att: string

    field name (kind) whose existing case value conditions the requirement

  • fields: string[]

    field names (kind) this rule applies to; these are required if the case value matches

  • label: string

    internal label used in references to this rule

  • Optional steps?: string[]

    the steps this rule is restricted to (all steps when not defined)

  • type: "reqAttsIfExistingAttVal"

    if the current case already has att with one of vals, all listed fields are required

  • vals: (string | number)[]

    case values for att that activate the rule