check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'tc_id' => 'nullable|digits_between:1,16', 'client_number' => [ !empty($this->customer->client_number) ? 'required' : 'nullable', 'digits_between:1,16' ], 'phone' => 'nullable|string|max:15', 'role' => ['required', new Enum(CustomerTypeEnum::class)] ]; } }