Skip to main content

HTML Guide

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

An empty string for the min attribute on an input element is invalid; it must be a valid number.

The min attribute specifies the minimum value an <input> element can accept when using types such as number, range, date, or datetime-local. According to the HTML specification, the value for min must be a valid floating point number (or a valid date/time string for date inputs). Setting min="" (an empty string) is invalid and will trigger validator errors.

HTML examples

Invalid usage:

<input type="number" min="" max="10">

Valid usage (set min to a specific number, or omit it if no minimum is required):

<input type="number" min="0" max="10">

or, if no minimum restriction is needed:

<input type="number" max="10">

Always provide a valid number for min or remove the attribute entirely if a minimum is not needed.

Learn more:

Related W3C validator issues