Using Extensions: Defining The Error Message

"foo" => "Your input was invalid!",

"accepted" => "The :attribute must be accepted.",

// The rest of the validation error messages..
/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    Validator::extend(...);

    Validator::replacer('foo', function ($message, $attribute, $rule, $parameters) {
        return str_replace(...);
    });
}

Using Extensions: Defining The Error Message — Structure map

Clickable & Draggable!

Using Extensions: Defining The Error Message — Related pages: