Signed-off-by: Zygmunt Krynicki <[email protected]>
---
 plainbox/plainbox/impl/secure/config.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/plainbox/plainbox/impl/secure/config.py 
b/plainbox/plainbox/impl/secure/config.py
index ea30615..02ce661 100644
--- a/plainbox/plainbox/impl/secure/config.py
+++ b/plainbox/plainbox/impl/secure/config.py
@@ -144,6 +144,20 @@ class Variable(INameTracking):
             if message is not None:
                 raise ValidationError(self, self.default, message)
 
+    def validate(self, value):
+        """
+        Check if the supplied value is valid for this variable.
+
+        :param value:
+            The proposed value
+        :raises ValidationError:
+            Tf the value was not valid in any way
+        """
+        for validator in self.validator_list:
+            message = validator(self, value)
+            if message is not None:
+                raise ValidationError(self, value, message)
+
     def _set_tracked_name(self, name):
         """
         Internal method used by :meth:`ConfigMeta.__new__`
-- 
1.9.0


-- 
Mailing list: https://launchpad.net/~checkbox-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~checkbox-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to