Project

General

Profile

Actions

Task #105524

open

FormEngine: input fields of type number are not working as expected when browser-native validation gets "bad input"

Added by Ayke Halder about 19 hours ago. Updated about 14 hours ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2024-10-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Issue for input-field with "bad input"

If the user has provided input that the browser is unable to convert, then programmatically reading the value-property returns an empty string, even though the browser is showing the user's input to the user.
Thereby the change-event does not trigger on the second attempt of bad input, as the value-property keeps returning just the empty string again.

Reproducible with input-field of type="number":

  • In Firefox insert any invalid value:
    E.g. 123px, then unfocus the field and then change it to 1234px.
  • In Chrome insert invalid values, consisting of only 0-9 and at max one of each character +-.e:
    E.g. 1-3, then unfocus the field and then change it to 1-4.

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


Related issues 2 (2 open0 closed)

Related to TYPO3 Core - Bug #105368: Form input fields that have native browser validation do not get marked as invalid but still block any saving of a recordUnder Review2024-10-20

Actions
Related to TYPO3 Core - Task #105526: Introduce test-option for FormEngineValidationUnder Review2024-10-30

Actions
Actions

Also available in: Atom PDF