forked from beimingwu/beimingwu
Merge pull request #347 from Learnware-LAMDA/fix_show_edu_only
fix(frontend): 1. display edu only text. 2. fix 163 mail check
This commit is contained in:
commit
3fd6917d2a
|
|
@ -11,6 +11,7 @@ export default {
|
|||
ReadAndAgree: "Read and Agree to",
|
||||
UserAgreement: "Agreement",
|
||||
PrivacyPolicy: "Privacy",
|
||||
OnlyEduEmail: "Due to limited system resources, we currently only support registration with educational email addresses. For non-educational email addresses, please contact bmwu-support{'@'}lamda.nju.edu.cn to apply.",
|
||||
Error: {
|
||||
UsernameAtLeast2Chars: "Username needs to be at least 2 characters.",
|
||||
UsernameAtMost20Chars: "Username cannot be more than 20 characters.",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export default {
|
|||
ReadAndAgree: "我已阅读并同意",
|
||||
UserAgreement: "用户协议",
|
||||
PrivacyPolicy: "隐私政策",
|
||||
OnlyEduEmail: "由于系统资源有限,现仅支持教育邮箱注册。非教育邮箱可联系bmwu-support{'@'}lamda.nju.edu.cn 进行申请。",
|
||||
Error: {
|
||||
UsernameAtLeast2Chars: "用户名至少需要 2 个字符",
|
||||
UsernameAtMost20Chars: "用户名不能超过 20 个字符",
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const userName = useField<string>({
|
|||
const email = useField<string>({
|
||||
defaultValue: "",
|
||||
validate: (value) => {
|
||||
if (!/^[a-z.-_]+@[a-z.-]+\.[a-z]+$/i.test(value)) return t("Register.Error.InvalidEmail");
|
||||
if (!/^[a-z.-_]+@[a-z0-9.-]+\.[a-z]+$/i.test(value)) return t("Register.Error.InvalidEmail");
|
||||
if (value?.length > 50) return t("Register.Error.EmailAtMost50Chars");
|
||||
return "";
|
||||
},
|
||||
|
|
@ -199,6 +199,11 @@ onUnmounted(() => {
|
|||
{{ t("Register.Register") }}
|
||||
</div>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<div class="mx-2">
|
||||
{{ t("Register.OnlyEduEmail") }}
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-form>
|
||||
<v-text-field
|
||||
|
|
|
|||
Loading…
Reference in New Issue