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

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

Open
toirl opened this issue Feb 1, 2016 · 0 comments
Open

Comments

@toirl
Copy link
Member

toirl commented Feb 1, 2016

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.

toirl pushed a commit that referenced this issue Nov 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant