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. This works only if Eloquent Helper code was generated before. Cmd-N or Alt-Insert inside any validation array:

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: