iro/error.py
branchdevel
changeset 126 1ac2439a68b5
parent 125 19b3f383c9ce
child 128 1a3ebdd3bdaf
--- a/iro/error.py	Mon Jan 30 06:51:28 2012 +0100
+++ b/iro/error.py	Mon Jan 30 06:52:46 2012 +0100
@@ -40,4 +40,12 @@
     def __str__(self):
         return "%i:%s"%(self.code,self.msg)
 
-
+class NotATelNumber(ValidateException):
+    def __init__(self, number,field=None):
+        msg = "No valid telnumber: '%s'"%(number)
+        ValidateException.__init__(self, 701, field, msg)
+    
+class InvalidMail(ValidateException):
+    def __init__(self, number,field=None):
+        msg = "No valid email: '%s'"%(number)
+        ValidateException.__init__(self, 702, field, msg)