Skip to main content
HTML Validation

Bad value “” for attribute “autocomplete” on element “input”: Must not be empty.

About This HTML Issue

An empty string is not a valid value for the autocomplete attribute on an input element.

The autocomplete attribute controls whether the browser can autofill input values, and it requires a valid, non-empty value according to the HTML specification. Acceptable values are on, off, or specific autocomplete tokens such as name, email, username, etc. Leaving it empty, like autocomplete="", causes validation errors.

Incorrect example:

<input type="text" name="username" autocomplete="">

Correct examples: Enable browser autocomplete:

<input type="text" name="username" autocomplete="on">

Disable browser autocomplete:

<input type="text" name="username" autocomplete="off">

Use a specific token (recommended for forms that collect particular data):

<input type="email" name="useremail" autocomplete="email">

Last reviewed: July 23, 2025

Was this guide helpful?

Find issues like this automatically

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

Ready to validate your sites?
Start your free trial today.