Closed ramyaragupathy closed 2 years ago
Tested this out and got this. What I realised is that the single character usernames are not being added to the request sent to the API.
Because they don't match this regex pattern - (that checks that it is a multiple-character word), the usernames are not added: https://github.com/hotosm/galaxy-ui/blob/4498c360e92071c2ee37ec28a3b6741a5d2cdece/src/utils/formatInputs.js#L23 https://github.com/hotosm/galaxy-ui/blob/4498c360e92071c2ee37ec28a3b6741a5d2cdece/src/utils/formatInputs.js#L24
The proposed solution is to either remove the regex or alter it to fit different usernames based on what OSM permits via username restrictions.
In the user report section when I input username with just single characters, I get the following error message:
Can we handle this much better than having to come out of of the user report page? Like disabling the submit button or showing an error message within the user report page?
This only happens when all the input usernames have just single character. It is not an issue when such names are combined with other usernames with more than one character.