Skip to content

Commit

Permalink
fix: user validator
Browse files Browse the repository at this point in the history
docs: update readme
  • Loading branch information
suyuan32 committed Nov 11, 2022
1 parent fa8e969 commit 987b3da
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.En.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
---
[![Go-Zero](https://img.shields.io/badge/Go--Zero-v1.4.1-brightgreen.svg)](https://go-zero.dev/)
[![Vben Admin](https://img.shields.io/badge/Vben%20Admin-v2.8.0-yellow.svg)](https://vvbin.cn/doc-next/)
[![GORM](https://img.shields.io/badge/GORM-v1.24.0-blue.svg)](https://gorm.io/)
[![Ent](https://img.shields.io/badge/Ent-v0.11.0-blue.svg)](https://entgo.io/)
[![Casbin](https://img.shields.io/badge/Casbin-v2.52.1-orange.svg)](https://github.com/casbin/casbin)
[![Release](https://img.shields.io/badge/Release-v0.0.6-green.svg)](https://github.com/suyuan32/simple-admin-core/releases)
[![Release](https://img.shields.io/badge/Release-v0.1.4-green.svg)](https://github.com/suyuan32/simple-admin-core/releases)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![SimpleAdmin](https://dcbadge.vercel.app/api/server/NDED5p2hJk)](https://discord.gg/NDED5p2hJk)
## Introduction
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
---
[![Go-Zero](https://img.shields.io/badge/Go--Zero-v1.4.1-brightgreen.svg)](https://go-zero.dev/)
[![Vben Admin](https://img.shields.io/badge/Vben%20Admin-v2.8.0-yellow.svg)](https://vvbin.cn/doc-next/)
[![GORM](https://img.shields.io/badge/GORM-v1.24.0-blue.svg)](https://gorm.io/)
[![Ent](https://img.shields.io/badge/Ent-v0.11.0-blue.svg)](https://entgo.io/)
[![Casbin](https://img.shields.io/badge/Casbin-v2.52.1-orange.svg)](https://github.com/casbin/casbin)
[![Release](https://img.shields.io/badge/Release-v0.0.6-green.svg)](https://github.com/suyuan32/simple-admin-core/releases)
[![Release](https://img.shields.io/badge/Release-v0.1.4-green.svg)](https://github.com/suyuan32/simple-admin-core/releases)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![SimpleAdmin](https://dcbadge.vercel.app/api/server/NDED5p2hJk)](https://discord.gg/NDED5p2hJk)
![QQ群](https://img.shields.io/badge/QQ%E7%BE%A4-801043319-blue)
Expand Down
8 changes: 4 additions & 4 deletions api/desc/user.api
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ type (

// User Name | 用户名
// Required: true
// Max length: 20
Username string `json:"username" validate:"alphanum,max=20"`
// Max length: 30
Username string `json:"username" validate:"alphanum,max=30"`

// User's nickname | 用户的昵称
// Required: true
// Max length: 10
Nickname string `json:"nickname" validate:"alphanumunicode,max=10"`
// Max length: 30
Nickname string `json:"nickname" validate:"alphanumunicode,max=30"`

// Password | 密码
// Required: true
Expand Down
8 changes: 4 additions & 4 deletions api/internal/types/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ definitions:
x-go-name: Mobile
nickname:
description: User's nickname | 用户的昵称
maxLength: 10
maxLength: 30
type: string
x-go-name: Nickname
password:
Expand All @@ -604,7 +604,7 @@ definitions:
x-go-name: Status
username:
description: User Name | 用户名
maxLength: 20
maxLength: 30
type: string
x-go-name: Username
required:
Expand Down

0 comments on commit 987b3da

Please sign in to comment.