Laravel - Validation - Specifying Custom Attribute Values

Many of Laravel's built-in error messages include an :attribute placeholder that is replaced with the name of the field or attribute under validation. To customize the values used to replace these placeholders for specific fields, you may pass an array of custom attributes as the fourth argument to the Validator::make method:

    
    $validator = Validator::make($input, $rules, $messages, [
        'email' => 'email address',
    ]);