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