Review main Merged

76544[BUGFIX] Simplify some FormEngine validations

Andreas Kienast CR +2 V +2 Normal +12 −221 updated 11/12/22, 12:47

Commit message

This patch simplifies some JavaScript-side validations in FormEngine.
Most notably, parsing dates and times is now handled by moment.js
(which will be replaced by luxon in the future), allowing us to remove
decades-old mambo-jambo code nobody can reverse-engineer
nowadays.

In the same run, `ltrim()` and the unused `btrim()` methods are
removed in favor of modern JavaScript functions.

Previously, it was possible to supply the invalid date "13-13-2016"
which was magically fixed to "13-01-2017". However, this was only
possible by setting the value and triggering the `change` event via
JavaScript and NOT by using the backend as a sane user. The behavior
introduced with this patch is now streamlined to behave like using
the datepicker or entering the field in the input field.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 5