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 Done
    • Andreas Kienast +2
    • Roman Büchler +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Roman Büchler +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 914

  1. Andreas Kienast uploaded patch set 1 11/10/22, 15:40

  2. core-ci voted on patch set 1 V -1 11/10/22, 15:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33509

  3. Andreas Kienast uploaded patch set 2 11/11/22, 07:12

  4. core-ci voted on patch set 2 V -1 11/11/22, 07:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33543

  5. Andreas Kienast uploaded patch set 3 11/11/22, 07:38

  6. core-ci voted on patch set 3 V -1 11/11/22, 07:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33546

  7. Andreas Kienast uploaded patch set 4 11/11/22, 08:53

  8. core-ci voted on patch set 4 V +1 11/11/22, 09:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33552

  9. Andreas Kienast updated the commit message in patch set 5 11/11/22, 10:27

  10. core-ci voted on patch set 5 V +1 11/11/22, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33560

  11. Roman Büchler voted on patch set 5 V +1 CR +1 11/11/22, 19:13

  12. Nikita Hovratov voted on patch set 5 V +1 CR +1 11/11/22, 19:48

  13. Andreas Kienast voted on patch set 5 V +2 CR +2 11/12/22, 12:47

  14. Andreas Kienast merged patch set 6 11/12/22, 12:47