예제 #1
0
 def validate_username(self, field):
     if data_cache.sismember('tuq:usernames', field.data):
         raise ValidationError('Username already registered')
예제 #2
0
 def validate_phone_number(self, field):
     if data_cache.sismember('tuq:phones', field.data):
         raise ValidationError('Mobile number already registered')
예제 #3
0
 def validate_email(self, field):
     if data_cache.sismember('tuq:emails', field.data):
         raise ValidationError('Email address has already been registered')