blank
Validates that a field is empty. The opposite of notEmpty.
Options
| Option | Type | Default | Description |
|---|---|---|---|
trim | boolean | false | If true, trims whitespace before checking — " " becomes valid |
message | string | locale default | Custom error message |
Playground
Valid values
| Value | Notes |
|---|---|
"" | Empty string |
" " | Whitespace only (when trim: true) |
Invalid values
| Value | Reason |
|---|---|
"hello" | Non-empty string |
"0" | The string "0" is not empty |
" " | Whitespace only (when trim: false, the default) |
Notes
- Common use case: honeypot fields — hidden inputs that should remain empty to detect bots.
- Use
trim: trueif you want whitespace-only values to also be considered empty.