This is a follow up to my previous question. I am trying to see if an email has already been used.
I am using the line
if snapshot.hasChild(email) {
Firebase keys cannot contain a .
(dot) character. If you want to store an email address in a key, you'll have to encode it. The common way to do that is to replace the .
with a ,
(comma), which conveniently is not allowed in email addresses. So test1@test.com
would be encoded as test1@test,com
.
I don't think you're actually storing the email address as a key, but I'll follow up for that on your previous question.