新增邮箱注册页面表单校验
新增邮箱注册页面表单校验,包括: - 邮箱格式校验 - 密码格式校验(至少8位, 包含大小写字母和数字) - 确认密码校验 - 服务条款和推广信息勾选校验 新增错误提示,包括: - 邮箱格式错误 - 密码格式错误 - 确认密码不一致 - 未勾选服务条款 - 未勾选推广信息 优化 用户体验,包括: - 使用 CheckboxWithLabel 组件优化勾选框样式 - 使用字符串资源 - 调整页面布局
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
package com.aiosman.riderpro
|
||||
|
||||
import android.content.Context
|
||||
|
||||
object ConstVars {
|
||||
// api 地址
|
||||
// const val BASE_SERVER = "http://192.168.31.190:8088"
|
||||
// const val BASE_SERVER = "http://192.168.31.36:8088"
|
||||
const val BASE_SERVER = "https://8.137.22.101:8088"
|
||||
const val BASE_SERVER = "http://192.168.31.36:8088"
|
||||
|
||||
// const val BASE_SERVER = "https://8.137.22.101:8088"
|
||||
const val MOMENT_LIKE_CHANNEL_ID = "moment_like"
|
||||
const val MOMENT_LIKE_CHANNEL_NAME = "Moment Like"
|
||||
|
||||
}
|
||||
|
||||
enum class ErrorCode(val code: Int) {
|
||||
USER_EXIST(10001)
|
||||
}
|
||||
fun Context.getErrorMessageCode(code: Int?): String {
|
||||
return when (code) {
|
||||
10001 -> getString(R.string.error_10001_user_exist)
|
||||
else -> getString(R.string.error_unknown)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user