The DateStepValidator created by DateTime uses the "step" attribute as if it were minutes, while the HTML input of type "datetime-local," considers it to be seconds. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#step
So, in most cases, you get a validation error, either from the browser side or from the PHP side.
Current behavior
For example, let's imagine that we want to restrict the selection to multiples of 30 minutes: if we set the "step" attribute to 1800, following the HTML standard, the input works correctly, but the DateStepValidator returns an error (for all values that do not respect a 30-hour step); if we set the "step" attribute to 30, the DateStepValidator works correctly (though contrary to the HTML specification), but the input allows incorrect values and, in most browsers, includes the selection of seconds.
How to reproduce
Create a Laminas Form, add a DateTimeLocal element and set the "step" attribute to any value. The browser will accept the input value if you consider "step" to be in seconds, and the PHP-side validation will accept the input if you consider "step" to be in minutes.
Expected behavior
DateTimeLocal should create a DateStepValidator that complies with the HTML standard, that is, it considers the value of the "step" attribute as seconds. The validation on the browser side and the validation provided by Laminas Validator should match.
Bug Report
Summary
The DateStepValidator created by DateTime uses the "step" attribute as if it were minutes, while the HTML input of type "datetime-local," considers it to be seconds. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#step So, in most cases, you get a validation error, either from the browser side or from the PHP side.
Current behavior
For example, let's imagine that we want to restrict the selection to multiples of 30 minutes: if we set the "step" attribute to 1800, following the HTML standard, the input works correctly, but the DateStepValidator returns an error (for all values that do not respect a 30-hour step); if we set the "step" attribute to 30, the DateStepValidator works correctly (though contrary to the HTML specification), but the input allows incorrect values and, in most browsers, includes the selection of seconds.
How to reproduce
Create a Laminas Form, add a DateTimeLocal element and set the "step" attribute to any value. The browser will accept the input value if you consider "step" to be in seconds, and the PHP-side validation will accept the input if you consider "step" to be in minutes.
Expected behavior
DateTimeLocal should create a DateStepValidator that complies with the HTML standard, that is, it considers the value of the "step" attribute as seconds. The validation on the browser side and the validation provided by Laminas Validator should match.