Skip to content
Snippets Groups Projects
Commit 544ddf37 authored by Andreas Fernandez's avatar Andreas Fernandez
Browse files

[BUGFIX] Simplify some FormEngine validations

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.

Resolves: #99058
Releases: main
Change-Id: I98af867ee3bda91222d21bcee1bc1f4c92e41d7e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76544


Tested-by: default avatarcore-ci <typo3@b13.com>
Te...
parent 802d8d6f
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment