laravel validate $request->all() code example
Example 1: email validation in laravel
'email' => 'required|email|unique:users,email',
//@sujay
Example 2: laravel validation
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Validator::extend(...);
Validator::replacer('foo', function ($message, $attribute, $rule, $parameters) {
return str_replace(...);
});
}