Does this do the job?
public function postSignup(Request $request) {
if($request->ajax()) {
$this->validate($request, [
'email' => 'required|unique:users|email|max:254',
'username' => 'required|unique:users|alpha_dash|max:16',
]);
if ($this->validate->fails()) {
return $this->validate->errors()->all();
}
}
$this->validate($request, [
'fullname' => 'required|alpha|max:20',
'email' => 'required|unique:users|email|max:254',
'password' => 'required|min:8',
'username' => 'required|unique:users|alpha_dash|max:16',
]);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community