Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/laravel/prefer-array-validation-rules

In the code-quality set. Safe fix. Runs when laravel is installed.

What it does

Use array syntax for validation rules instead of ‘a|b’ strings.

Configuration

[lint.rules]
"laravel/prefer-array-validation-rules" = "error"

To skip it in some files or lines, add an override or an ignore comment.

Replaces

Merged rules

These old IDs are now this rule. A config that still names one stops with an error. See merged rules.

  • lint/laravel/prefer-validation-rule-array

More lint/laravel rules · Edit this page

Last updated on

Was this page helpful?