Project-Pandora-Game / pandora

https://project-pandora.com
Other
11 stars 3 forks source link

Bug: Display name format is not validated before attemt to save it #743

Closed Jomshir98 closed 3 months ago

Jomshir98 commented 4 months ago

The account display name has a limited format, but client's UI doesn't validate it before attempting to set it. As the message to change settings if one-off, there is no reaction about this failing as it gets silently rejected. We need to add a warning in UI when the new name is not valid.

Jomshir98 commented 4 months ago

We already have a tool for generating user-friendly error based on validation. So to anyone implementing this use the following code to obtain a validation function that can be called to get the error:

const displayNameValidator = FormCreateStringValidator(DisplayNameSchema, 'Display name');