Merge pull request #2442 from ywk253100/170606_user_api

Keep the same behavior with UI, fix #2226
This commit is contained in:
Daniel Jiang 2017-06-07 10:57:22 +08:00 committed by GitHub
commit 21a28e3fe6

View File

@ -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")
}