Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sissaschool/xmlschema
Browse files Browse the repository at this point in the history
  • Loading branch information
brunato committed Nov 30, 2021
2 parents ff659d8 + 51ee833 commit a5df9ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xmlschema/validators/facets.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ def _parse_value(self, elem: ElementType) -> None:
primitive_type = getattr(self.base_type, 'primitive_type', None)
if primitive_type is None or primitive_type.name not in {XSD_QNAME, XSD_NOTATION_TYPE}:
# See: https://www.w3.org/Bugs/Public/show_bug.cgi?id=4009
self._validator = self._min_length_validator # type: ignore[assignment]
self._validator = self._max_length_validator # type: ignore[assignment]

def _min_length_validator(self, value: Any) -> None:
def _max_length_validator(self, value: Any) -> None:
if len(value) > self.value:
reason = "value length cannot be greater than {!r}".format(self.value)
raise XMLSchemaValidationError(self, value, reason)
Expand Down

0 comments on commit a5df9ce

Please sign in to comment.