Players and other users will not always type the same name in the exact same way, or remember how they typed it. Having a player named "Alice" and another player named "alice" is too confusing even though it would technically work.
Fixing this is going to require changes to the redux store so that case-insensitive duplicates can't be added and so that selectors match in a case insensitive way.
It's going to require work on the server to prevent them from being added with calls to the REST API.
I don't know if there's a way to enforce case insensitivity in SQLite and should look.
Do JavaScript and/or SQLite have a caseFold() function? If not, is upper or lower case preferred for comparison?
Although the client should not be interacting with the API or the redux store except through dispatching actions and applying selectors, it's still possible that the client is interacting with data values directly, so it should also be checked.
Players and other users will not always type the same name in the exact same way, or remember how they typed it. Having a player named "Alice" and another player named "alice" is too confusing even though it would technically work.
Fixing this is going to require changes to the redux store so that case-insensitive duplicates can't be added and so that selectors match in a case insensitive way.
It's going to require work on the server to prevent them from being added with calls to the REST API.
I don't know if there's a way to enforce case insensitivity in SQLite and should look.
Do JavaScript and/or SQLite have a
caseFold()
function? If not, is upper or lower case preferred for comparison?Although the client should not be interacting with the API or the
redux
store except through dispatching actions and applying selectors, it's still possible that the client is interacting with data values directly, so it should also be checked.