Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
class ValidationError(Exception):
+ """ValidationError is the exception raised by validators.
+
+ Should be raised from the __call__ method of the Validator subclass.
+ """
pass
class Validator(metaclass=ABCMeta):
+ """Base class for Validators used by SambaOption.
+
+ Subclass this to make custom validators and implement __call__.
+ """
@abstractmethod
def __call__(self, field, value):