summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index eb08a7be..cf213d70 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -119,6 +119,8 @@ class ValidationError(IPAError):
:param error: The error message describing the failure.
:param index: If multivalue, index of value in multivalue tuple
"""
+ assert type(name) is str
+ assert index is None or (type(index) is int and index >= 0)
self.name = name
self.value = value
self.error = error