json([ 'message' => 'Validation failed.', 'errors' => $validator->errors(), ], 422) ); } }