|
@@ -166,10 +166,11 @@ function validateForm() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // 验证手机号格式
|
|
|
- const phoneRegex = /^1[3-9]\d{9}$/
|
|
|
- if (!phoneRegex.test(formData.value.phone)) {
|
|
|
- toast.error(t('auth.register.error.emptyPhone'))
|
|
|
+ // 孟加拉手机号校验:支持 01xxxxxxxxx 或 1xxxxxxxxx
|
|
|
+ const phoneDigits = formData.value.phone.replace(/\D/g, '')
|
|
|
+ const bdPhoneRegex = /^0?1\d{9}$/
|
|
|
+ if (!bdPhoneRegex.test(phoneDigits)) {
|
|
|
+ toast.error(t('auth.register.error.invalidPhone'))
|
|
|
resolve(false)
|
|
|
return
|
|
|
}
|
|
@@ -290,7 +291,7 @@ onUnmounted(() => {
|
|
|
</wd-form>
|
|
|
|
|
|
<!-- 登录提示 -->
|
|
|
- <view class="fixed bottom-20rpx left-0 w-full text-center" :style="{ paddingBottom: `${safeAreaInsets?.bottom + 20}px` }">
|
|
|
+ <view class="mt-300rpx w-full text-center" :style="{ paddingBottom: `${safeAreaInsets?.bottom + 20}px` }">
|
|
|
<text class="text-28rpx text-#5C5C5C">
|
|
|
By regstration,you agree to our
|
|
|
</text>
|