You can add a custom rule to the validator:
Validator::extend('checkHashedPass', function($attribute, $value, $parameters)
{
if( ! Hash::check( $value , $parameters[0] ) )
{
return false;
}
return true;
});
Now you can use this custom rule as:
'currPassword' => 'required|checkHashedPass:' . Input::get('currPassword')
So, if validation fails for this rule, you will get error messages for this in your view and can be accessed with $errors->first('currPassword');, but you need to pass a custom error message for this custom rule that you created using:
$messages = array( 'currPassword.checkHashedPass' => 'Current Password failed!' );
, $messages, :
$validator = Validator::make(Input::all(), $rules, $messages);
.