I'm using Firebase Simple Login with email/password authentication. I'm storing a variable called 'username' in /id/username so that each of the users have a unique name. However, the users can edit the value at that location and put an existing username. Is there a way to forbid users to change their username to an existing one? i.e. if /anyid/username/JOHN exists do not allow the change. Is there a rule that could be written for that?
Thank you in advance.