# How can I extend an existing request?

The `expects()` method can be used to add custom validation rules (and messages) for your custom field (or to overwrite the existing rules/messages for an existing field):

```php
// Adding a custom field
\Aero\Admin\Http\Requests\Catalog\CreateProductRequest::expects('acme', 'required|string|max:255', [
    'acme.required' => 'The acme field is required.',
]);

// Making existing categories field required
\Aero\Admin\Http\Requests\Catalog\CreateProductRequest::expects('categories', 'required|array');
```

---

### Parameters

<table border="1" id="bkmrk-parameter-type-descr" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3333%;"></col><col style="width: 33.3333%;"></col><col style="width: 33.3333%;"></col></colgroup><tbody><tr><td>**Parameter**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`$field`  
</td><td>`string`  
</td><td>The key of the field to validate.</td></tr><tr><td>`$rules`  
</td><td>`string|array|\Closure`  
</td><td>The rules to use when validating. If callback is supplied, it will receive the request as the argument.</td></tr><tr><td>`$messages`  
</td><td>`array|null`  
</td><td>The messages for the rules, key's are of the form `{$field}.{$rule}`.</td></tr></tbody></table>