'required|numeric', 'phone' => 'required|numeric', ]; } /** * Get data to be validated from the request. * * @return array */ protected function validationData() { if ($this->phone) { $this->merge(['phone' => preg_replace('/[^0-9]/', '', $this->phone)]); } return $this->all(); } }