Skip to content

Requests & Validation

Validation rules

Validation rules completion work in Form Request classes and in validate calls:


Request fields

Add Eloquent model fields

Request validation rules often contains fields for some Eloquent model.
Laravel Idea provides a quick way to add these fields automatically.

Run Generate command(Cmd-N, Alt-Insert) inside any validation array and choose Add Eloquent Model Fields:


This works only if Eloquent Helper code was generated before.

Customize validation rules completion

Validation rules completion can be configured in the settings Preferences | Languages & Frameworks | Laravel Idea | Validation:

For example, if you want to complete validation rules for $validation field of every child class of \VendorName\VendorAction class just add "VendorAction" to "Rule completion base class names" and "validation" to "Rule completion field names". Result: