# Bad value “” for attribute “step” on element “input”: The empty string is not a valid positive floating point number.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-for-attribute-step-on-element-input-the-empty-string-is-not-a-valid-positive-floating-point-number
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

An empty `step` attribute on an `<input>` is invalid: the value must be a number greater than zero, or the keyword `any`.

The `step` attribute sets the interval between allowed values. On `number`, `range`, `time` and `datetime-local` inputs, the HTML standard requires it to be a valid floating point number greater than zero. An empty string doesn't parse as a number, so browsers ignore the attribute and fall back to the input type's default step (`1` for `number` and `range`, 60 seconds for `time`). The spinner buttons and the browser's own validation then work with a step you never chose.

The markup usually comes from a form builder or a template that always prints `step="{{ value }}"`, even when no step was configured. Either set the step you mean or leave the attribute out. Use `step="any"` when the field should accept decimals of any precision.

`date`, `month` and `week` inputs take whole numbers for `step`, so an empty value there produces a similar message ending in "not a valid positive integer" instead.

## Invalid example

```html
<label for="quantity">Quantity</label>
<input id="quantity" name="quantity" type="number" min="0" max="99" step="">
```

## Valid examples

Remove the attribute to keep the default step of `1`:

```html
<label for="quantity">Quantity</label>
<input id="quantity" name="quantity" type="number" min="0" max="99">
```

Set an explicit step, or `any` to allow any decimal value:

```html
<label for="price">Price</label>
<input id="price" name="price" type="number" min="0" step="0.01">

<label for="weight">Weight in kg</label>
<input id="weight" name="weight" type="number" min="0" step="any">
```
