增加手机验证码校验

This commit is contained in:
xxq250 2022-11-24 14:30:10 +08:00
parent 4e244bed3a
commit 5da6330f57
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ class Api::V1::UsersController < Api::V1::BaseController
phone = strip(params[:phone])
code_type = params[:code_type]
return tip_exception(-2, "手机号格式有误") unless mail =~ CustomRegexp::PHONE
return tip_exception(-2, "手机号格式有误") unless phone =~ CustomRegexp::PHONE
verifi_code = VerificationCode.where(phone: phone, code: code, code_type: code_type).last
return render_ok if code == "123123" && EduSetting.get("code_debug") # 万能验证码,用于测试 # TODO 万能验证码,用于测试