新增邮箱注册页面表单校验
新增邮箱注册页面表单校验,包括: - 邮箱格式校验 - 密码格式校验(至少8位, 包含大小写字母和数字) - 确认密码校验 - 服务条款和推广信息勾选校验 新增错误提示,包括: - 邮箱格式错误 - 密码格式错误 - 确认密码不一致 - 未勾选服务条款 - 未勾选推广信息 优化 用户体验,包括: - 使用 CheckboxWithLabel 组件优化勾选框样式 - 使用字符串资源 - 调整页面布局
This commit is contained in:
@@ -365,7 +365,14 @@ class AccountServiceImpl : AccountService {
|
||||
}
|
||||
|
||||
override suspend fun registerUserWithPassword(loginName: String, password: String) {
|
||||
ApiClient.api.register(RegisterRequestBody(loginName, password))
|
||||
val resp = ApiClient.api.register(RegisterRequestBody(loginName, password))
|
||||
|
||||
if (!resp.isSuccessful) {
|
||||
parseErrorResponse(resp.errorBody())?.let {
|
||||
throw it.toServiceException()
|
||||
}
|
||||
throw ServiceException("Failed to register")
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun changeAccountPassword(oldPassword: String, newPassword: String) {
|
||||
|
||||
Reference in New Issue
Block a user