Beispiel #1
0
 def validate_emailCode(self,filed):
     emailcode = getCache(filed.data)
     if not emailcode or emailcode != filed.data.upper():
         return jsonify(respParamErr(msg="验证码错误"))
Beispiel #2
0
 def validate_emailCode(self, filed):
     emailcode = getCache(filed.data)
     # upper()  不区别大小写
     print("校验验证码")
     if not emailcode or emailcode != filed.data.upper():
         return jsonify(respParamErr(msg='请输入正确的邮箱验证码'))
Beispiel #3
0
 def validate_email(self,filed):
     print("校验邮箱")
     user = User.query.filter(User.email == filed.data).first()
     if user:
         return jsonify(respParamErr(msg="邮箱已注册"))
Beispiel #4
0
 def validate_email(self, filed):
     user = User.query.filter(User.email == filed.data).first()
     if user:
         return jsonify(respParamErr(msg='邮箱已注册'))