mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
Merge pull request #2442 from ywk253100/170606_user_api
Keep the same behavior with UI, fix #2226
This commit is contained in:
commit
21a28e3fe6
@ -352,7 +352,7 @@ func commonValidate(user models.User) error {
|
||||
return fmt.Errorf("Email can't be empty")
|
||||
}
|
||||
|
||||
if isIllegalLength(user.Realname, 0, 20) {
|
||||
if isIllegalLength(user.Realname, 1, 20) {
|
||||
return fmt.Errorf("realname with illegal length")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user