xsdata-pydantic icon indicating copy to clipboard operation
xsdata-pydantic copied to clipboard

validators min max not working?

Open rbosch opened this issue 5 months ago • 0 comments

Hi,

I have this xsd fragment:

<xs:element name="activityid">
    <xs:simpleType>
        <xs:restriction base="xs:integer">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="100"/>
        </xs:restriction>
    </xs:simpleType>
</xs:element>

It creates a model with the following field (meta data):

activityid: int = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
            "min_inclusive": 0,
            "max_inclusive": 100,
        }
    )

But the validators are not working.

rbosch avatar Sep 04 '24 08:09 rbosch