protected normalizeComponents()

in src/services/form-validation/FormValidationService.ts [137:146]


  protected normalizeComponents(components: Array<FormComponent>): Array<FormComponent> {
    // Rename custom components, so they can be validated as default ones
    return components.map((component) => ({
      ...component,
      type: this.normalizeComponentType(component.type),
      ...(component.components ? { components: this.normalizeComponents(component.components) } : {}),
      ...(component.columns ? { columns: component.columns.map((column) => ({ ...column, components: this.normalizeComponents(column.components) })) } : {}),
      ...(_.isArray(component.rows) ? { rows: component.rows.map((row) => row.map((column) => ({ ...column, components: this.normalizeComponents(column.components) }))) } : {}),
    }));
  }