-
Notifications
You must be signed in to change notification settings - Fork 13.5k
User Save fail if Optional Custom Select Field is left empty #8070
Description
Description:
Leave optional (Required false) type select custom Fields empty and Save Users Profile not working.
Show: error-user-registration-custom-field
Not saving Changes
Fill fields would be able to save.
Additional Note Previous Versions needed an empty option also for not required Fields, this seems to be imptoved now. Attached Custom Field COnfig will produce 2 empty fields for Gender. Removing the first empty option will also not solve the Saving Issue.
Server Setup Information:
- Version of Rocket.Chat Server: 0.59.0-rc.4
- Operating System: docker, Debian?
- Deployment Method(snap/docker/tar/etc): docker
- Number of Running Instances: 1
- DB Replicaset Oplog: ?
- Node Version: ?
Steps to Reproduce:
- Admin->Registration->Custom Fields add some optional Custom Select fields here is a part of mine:
{
"user_gender": {
"type": "select",
"options": [" ", "female", "male"],
"required": false
},
"phone": {
"type": "text",
"maxLength": 20,
"required": false
},
"description": {
"type": "text",
"required": false
}
}
- Changing normal users Profile save with leaving optional field blank result in described error
Expected behavior:
Saving Changes
Actual behavior:
Not Saving Changes
Relevant logs:
No Logs on server
WSS Log
"{"msg":"result","id":"17","error":{"isClientSafe":true,"error":"error-user-registration-custom-field","reason":"Value for field **REMOVED is invalid","details":{"method":"registerUser"},"message":"Value for field **REMOVED is invalid [error-user-registration-custom-field]","errorType":"Meteor.Error"}}