The app’s own rules
With no settings, the field shows and checks Password::defaults() — the rule you set in AppServiceProvider. This demo sets none, so Laravel’s default applies: at least 8 characters. The eye button shows the password.
Note: Try it
Type harbor: “At least 8 characters” is not ticked yet. Add 2026: it is ticked. Click the eye to see what you typed.
- At least 8 characters
Your own rules, ticked off as you type
->passwordRule(Password::min(12)->mixedCase()->numbers()->symbols()) sets the rules for this field. Each rule in the list is ticked as soon as it is met.
Note: Try it
Type harbor: none of the four rules is met yet. Then change it to Harbor-Supply-2026: all four rules are ticked one after another.
- At least 12 characters
- Both upper and lower case letters
- At least one number
- At least one symbol, like ! or #
A rule added with rule()
If you already add a Password rule with ->rule(Password::min(10)->letters()->numbers()), the field shows that rule and does not check it twice.
Note: Try it
Type harbor and press “Show what would be saved”: Laravel’s error message appears, the same as the list says. Make it harbor2026: it is saved.
- At least 10 characters
- At least one letter
- At least one number
How strong the password is
The strength meter (Very weak … Very strong) gives a tip on how to make the password better. It is only an estimate and never stops saving — the rules do that. Here the rules are hidden with ->requirements(false), so only the meter is shown.
Note: Try it
Type password: “Very weak”, because lots of people use it. Type Harbor123456 instead: “Fair”, with the tip “Avoid runs like “abc”, “123” or “qwerty”.” Then type blue-tugboat-mustard-41: “Very strong”.
Without the strength meter
->strengthMeter(false) hides the meter and shows only the rules.
Note: Try it
Type harbor2026: only the list of rules is shown under the field, with no meter.
- At least 8 characters
Creating a strong password
The sparkle button at the right end creates a password in the browser that always meets the rules. ->generatable(length: 20) makes it 20 characters long. Look-alike characters (0 O 1 l I) are left out; avoidAmbiguous: false allows them.
Note: Try it
Click the sparkle at the right end of the field: a 20-character password appears, shown in clear text, with a note and a “Copy” button.
- At least 8 characters
Creating a password without symbols
->generatable(symbols: false) creates passwords of letters and digits only, for devices where symbols are hard to type. If the rules ask for a symbol, a symbol is still used.
Note: Try it
Click the sparkle a few times: each password has 16 letters and digits, and no symbols.
- At least 8 characters
Not found in a data leak
Password::min(8)->uncompromised() adds “Not found in a known data leak”. This is checked on the server when the form is saved, against the Have I Been Pwned list (only the first 5 characters of a hash are sent).
Note: Try it
Type password123 and press “Show what would be saved”: it is refused because it has appeared in a data leak. Press the sparkle and try again: it is saved.
- At least 8 characters
- Not found in a known data leak (checked when you save)
Saving a hash, and only when filled in
As in Filament, ->dehydrateStateUsing(fn ($state) => Hash::make($state)) saves a hash instead of the password, and ->dehydrated(fn ($state) => filled($state)) keeps the old password when the field is left empty on an edit form.
Note: Try it
Press “Show what would be saved” with the field empty: nothing is saved. Then type harbor2026 and press it again: a hash starting with $2y$ is saved.
- At least 8 characters