laravel/framework — pull request #4037 by joychao (2014-04-04 03:50:40+00:00)
Title: add displayabled values support

some times we need custom displayable values, for example:

HTML:
```html
banner type

Image

video

Web

...

banner image

banner video

...
```

Rule:
```php
...
$rules = array(
'content_type' => 'required|in:1,3,4',
'image' => 'required_if:content_type,1',
'video' => 'required_if:content_type,3',
),
...
```

app/lang/en/validation.php:

```php
...
'attributes' => array(
'content_type' => 'banner type',
'image' => 'banner image url',
'video' => 'banner video url',
),
...
```

Request:
```php
array(
'content_type' => 1,
'image' => '',
);
```

Errors:
`The banner image url field is required when content type is 1. `
> Difficult for users to understand what the number `1` is

We expect that this:

`The banner image url field is required when banner type is Image`.

Now we can add the `values` ​field to the `app/lang/en/validation.php` to achieve it：
```php
...
'values' => array(
'content_type' => array(
'1' => 'Image',
'3' => 'Video',
'4' => 'Web'
),
),
...
```

Thanks!