Is there a way to tell Chrome password generator the website password policy? Is there a way to tell Chrome password generator the website password policy? google-chrome google-chrome

Is there a way to tell Chrome password generator the website password policy?


Yes. According to the Chromium design document for password generation it takes into account HTML5 attributes:

PasswordGenerationManager takes messages from the renderer and makes an OS specific dropdown. This UI use a PasswordGenerator to create a reasonable password for this site (tries to take in account maxlength attribute, pattern attribute, etc.). If the password is accepted, it is sent back to the renderer.

I would consider using regex to validate passwords to be an anti-pattern, but at least there's a way to do what you want.


I dug around for a while and looked into the answer given by @user10580275, but I couldn't get it to obey the pattern like @BrunoLM.

I noticed that several websites (Quickbooks, Wordpress, Tumblr) seem to follow the rules given by Chrome and it seemed almost random whether it would conform to the rules or not. I couldn't find a pattern between them.

However I did find this article by Google explaining how to use the suggested password feature, which happened to have this in it:

If a website doesn't accept a password suggested by Chrome, let us know.

This link sends you to a form where you can fill out your website address and tell them their password generation isn't conforming to the rules. I don't know how Chrome's suggested password works under the hood, but I've submitted our url to them to see if they can adjust it.

I think the best option is to submit your URL and do your own validation live to inform the user the generated password does not match the criteria you require. It seems to ignore pattern and other attributes contrary to the design document posted.