$validator = Validator::make($request->all(), [
'email' => 'required|min:9|max:50|email',
'password' => 'required|min:8|max:255|password'
]);
if ($validator->fails()) {
echo "Failed! Sorry :(";
Session::flash('error', $validator->messages()->first());
//return Redirect::back()->withErrors($validator);
}
else {...
But if I write
'password' => 'required|min:8|max:255'
the validation is passed, but when I write
'password' => 'required|min:8|max:255|password'
it doesn't pass and the result is "Failed! Sorry :(". I mean that works the echo which I wrote above.
What can be the problem? Or the "password" is excessive? I am newbie in Laravel.
Important! The password in database is being saved hashed.