Laravel 5.4 version
The validate() function works until I test more than 3 errors in the form. Upon automatic redirect after buildfailedvalidationresponse function, the 4 $error messages aren't present on and neither is the old form data. This only doesn't work in chrome. Firefox/internet explorer is fine. I have data dumped throughout the process of validatesrequest file and it shows the $error variables being passed correctly to the buildfailedvalidationresponse function but no errors/old form data are presented after redirect. I was just wondering if anybody has had an issue like this with different browsers.
validation method
protected function validateRegistration(Request $request) {
$rules = array(
'name' => 'required|string',
'email' => array('required','string','email','unique:users,email'),
'phone' => 'required|digits:10',
'userid' => array('required','string','min:6','max:10','unique:users,userid','regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*(_|[^\w])).+$/'),
'password' => array('required','string','min:8','max:12','regex:/^(?
=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*(_|[^\w])).+$/'),
'repeatedpassword' => 'required|string|same:password',
'code' => 'required|digits:4|exists:codes,code'
);
$this->validate($request, $rules);
if ($this) {
$store = new User();
return $store->insertuser();
}
}
blade validation display errors statement
<div class="container">
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li> {{ $error }} </li>
@endforeach
</ul>
</div>
@endif
</div>