Skip to content

Commit

Permalink
Customizing The Validation Attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysiosarvanitis authored Nov 16, 2018
1 parent 1b0cf7c commit 8786045
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,23 @@ You may customize the error messages used by the form request by overriding the
];
}

<a name="customizing-attributes"></a>
### Customizing The Validation Attributes

You may customize the validation attributes used by the form request by overriding the `attributes` method. This method should return an array of attribute / name pairs:

/**
* Get custom attributes for validator errors.
*
* @return array
*/
public function attributes()
{
return [
'email' => 'email address',
];
}

<a name="manually-creating-validators"></a>
## Manually Creating Validators

Expand Down

0 comments on commit 8786045

Please sign in to comment.