Skip to main content
HTML Validation

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

About This HTML Issue

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

<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:

<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:

<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">

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries