Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review

86842[BUGFIX] Handle browser-native validation-error `bad input` in form validation

Ayke Halder CR 0 V -1 Easy +26 −5 updated 11/11/26, 12:28

Commit message

This triggers form validation error-messages also in case the
browser-native validation fails with error `bad input`.
This also removes the form validation error-message again, when the
`bad input`-error is resolved.

`bad input` is especially triggered by `input[type="number"]`-fields.

Before if a field's value was `bad input`, the original user input was
still displayed to the user by the browser and the field was not marked
as invalid.
But on 'save record' an empty string was transmitted as value.

Before without #105368 a click on 'save' just failed silently, thereby
the record was not saved and the form just stayed as-is.
Also the user did not see that the field is invalid, as it was not
marked as invalid in any way.

Example `bad input` for a number-field:

* In Chrome: e.g. `1-2`
* In Firefox: e.g. `123px`

It might be necessary to enter the `bad input` twice in a row to
reproduce the issue. In case the field was not empty before,
`bad input` might get cleared on the first try.

Also see:
https://developer.mozilla.org/en-US/docs/Web/API/ValidityState/badInput

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 6
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/42/86842/6 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/42/86842/6 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Relation chain 2

  1. 86842 [BUGFIX] Handle browser-native validation-error `bad input` in form validation This change

  2. main 86665[BUGFIX] Report native field validation errors in FormEngine This change is based on it Merged Ayke Halder CR +2 V +2 → 14.3 Normal +45 −6

    The chain has patch set 16 of 20, the changes above it need a rebase.

Issues 3

Files 3

Review log 713

  1. Ayke Halder uploaded patch set 1 10/30/24, 23:45

  2. core-ci voted on patch set 1 V +1 10/30/24, 23:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68879

  3. Ayke Halder updated the commit message in patch set 2 V +1 10/30/24, 23:54

  4. core-ci voted on patch set 2 V +1 10/30/24, 23:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68880

  5. Ayke Halder uploaded patch set 3 V +1 10/31/24, 17:33

  6. core-ci voted on patch set 3 V +1 10/31/24, 17:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68937

  7. Ayke Halder uploaded patch set 4 V +1 11/21/24, 10:54

  8. core-ci voted on patch set 4 V +1 11/21/24, 11:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69919

  9. Ayke Halder uploaded patch set 5 V +1 11/21/24, 14:41

  10. core-ci voted on patch set 5 V +1 11/21/24, 14:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69954

  11. Benni Mack updated the commit message in patch set 6 V +1 04/22/26, 06:30

  12. core-ci voted on patch set 6 V -1 04/22/26, 07:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100716

  13. Benni Mack commented on patch set 6 11/11/26, 12:28

    Unresolved

    I think we can abandon this patch. Once https://review.typo3.org/c/Packages/TYPO3.CMS/+/86665 is merged, this one is solved.