Ejemplo n.º 1
0
 def check_register_value(self, username, password, email, phone=None):
     if not REGEX_USERNAME.match(username):
         return False
     """dont allow register a guest username"""
     if REGEX_GUEST_USERNAME.match(username):
         return False
     if not REGEX_PASSWORD.match(password):
         return False
     if not REGEX_EMAIL.match(email):
         return False
     if phone:
         if not REGEX_PHONE.match(phone):
             return False
     return True
Ejemplo n.º 2
0
 def check_register_value(self, password, email):        
     if not REGEX_PASSWORD.match(password):
         return False
     if not REGEX_EMAIL.match(email):
         return False
     return True