There is an issue
Text Input
Text Input with Error
- Error:
Number Input: step validation
HTML inputs of type="number" have a default `step` value of `1`. The PLOS behavior for number inputs does not follow this convention.
The step attribute defaults to "any" when it is not set. This keeps browser-level validation off, so a value such as 1.3 is sent to the backend and PLOS can return on-brand error messages.
We recommend keeping the default step for numbered inputs and not setting a step. If you do set a step (for example step="1"), the browser takes over validation and shows its own non-PLOS error message, blocking submission before the value can reach the backend.
With step="1" (not recommended)
Type a decimal such as 1.3 into this field and submit. Because step="1" is set, the browser runs its own validation, blocks the post, and shows a non-PLOS message, so the on-brand error below is never reached by a real submission.
Without step (default "any", recommended)
Type the same decimal (1.3) into this field and submit. This example uses the default component behavior of step="any". The value posts to the backend, which returns the on-brand PLOS error shown below.