public function getRequiredFields()
    {
        $rules = $this->getRules();

        $requiredFields = array_where(
            $rules, function ($value, $key) {
                if (is_array($value)) {
                    $value = implode('|', $value);
                }

                return str_contains($value, ['required', 'sometimes']);
            }
        );

        return $requiredFields;
    }