laravel/laravel — pull request #391 by sqwk (2012-03-07 04:22:39+00:00)
Title: Use rule keys for error messages

Mostly useful for checking whether a specific rule failed.

if (array_key_exists('required', $validation->errors->get('fieldname'))) {}