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

@param \sndsgd\form\field\FieldInterface $field
@return array<string,string>
Retreive a rules from a field