My code does a simple redirect back with input and error if a doesn't enter a field correctly. This works on my local development environment just fine and the "old" inputs are populated in the form along with the error beneath the form field.
The live site is on a AWS server and forge was used to get it up and running. Please let me know if this is an issue with AWS or forge or I'm missing something to get it working on production.
$v = Validator::make($data, [
'fname' => 'required|string',
'lname' => 'required|string',
'title' => 'required|string',
'email' => 'required|email|unique:users,email',
'password' => 'required',
'password-check' => 'required',
'g-recaptcha-response' => 'required',
'terms' => 'required',
'service' => 'required',
'captcha' => 'required|min:1'
]);
if ($v->fails()) {
return redirect()->back()->withInput()->withErrors($v->errors());
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire