diff --git a/tiramisu/option/ipoption.py b/tiramisu/option/ipoption.py index 1c4278e..85ee85e 100644 --- a/tiramisu/option/ipoption.py +++ b/tiramisu/option/ipoption.py @@ -64,7 +64,7 @@ class IPOption(StrOption): try: new_value = str(ip_address(value)) if value != new_value: - raise ValueError(f'should be {new_value}') + raise ValueError(_(f'should be {new_value}')) except ValueError: raise ValueError() @@ -72,6 +72,8 @@ class IPOption(StrOption): value: str) -> None: super().validate(value) if self.impl_get_extra('_cidr'): + if '/' not in value: + raise ValueError(_('CIDR address must have a "/"')) self._validate_cidr(value) else: self._validate_ip(value)