sanitize(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'reported_to' => ['required', 'integer', 'exists:users,id'], 'notes' => ['required', 'string'], ]; } public function sanitize() { $input = $this->all(); $input['notes'] = isset($input['notes']) ? htmlspecialchars($input['notes']) : ''; $this->replace($input); } }