Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.

Reinitialisation of form fields while validation to get relevant fields #1

@toirl

Description

@toirl

Formbar needs to initialise the fields twice when doing a validation:

  1. The first run is when first loading the form. All fields are build
  2. The second run is on validation. Formbar now checks which fields based on the condionals of the form are relevant for validation. Currently the only way to check this is to reinit (redo step 1) the fields and evaluate all rules while collecting the fields.

This is not well implemented and seems to be not necessary. Further this might cause performance issues but in some tests a form with may rules the seconds run doesn't take to much time:

To show the relative difference: ~4seconds for both calls and ~3.6 seconds with only the first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions