protected function getRulesFromField(FieldInterface $field): array
    {
        $ret = [];
        foreach ($field->getRules() as $rule) {
            $ret[] = [
                "description" => $rule->getDescription(),
                "errorMessage" => $rule->getErrorMessage(),
            ];
        }
        return $ret;
    }