diff --git a/owrx/property/validators.py b/owrx/property/validators.py index 9a9ebfe..23008d4 100644 --- a/owrx/property/validators.py +++ b/owrx/property/validators.py @@ -79,12 +79,13 @@ class NumberValidator(OrValidator): super().__init__(IntegerValidator(), FloatValidator()) -class RegexValidator(Validator): +class RegexValidator(StringValidator): def __init__(self, regex: re.Pattern): self.regex = regex + super().__init__() def isValid(self, value): - return isinstance(value, str) and self.regex.match(value) is not None + return super().isValid(value) and self.regex.match(value) is not None validator_types = {