This commit is contained in:
Dion Moult
2025-01-12 22:43:41 +11:00
parent 04092d19be
commit 0eb987fc07
3 changed files with 26 additions and 12 deletions
+11 -2
View File
@@ -998,8 +998,17 @@ class Restriction:
for constraint, value in self.options.items():
value = [value] if not isinstance(value, list) else value
for v in value:
if constraint in ["length", "minLength", "maxLength", "maxExclusive", "maxInclusive",
"minExclusive", "minInclusive", "totalDigits", "fractionDigits"]:
if constraint in [
"length",
"minLength",
"maxLength",
"maxExclusive",
"maxInclusive",
"minExclusive",
"minInclusive",
"totalDigits",
"fractionDigits",
]:
value_dict = {"@value": v}
else:
value_dict = {"@value": str(v)}