If the mail added to the database is the mail registered to the database, how can I give a warning when the button is pressed?
What kind of warning are you looking for? Can you provide more information please?
how about an alert block?
The warning I’m looking for is “this email address is already registered, please enter a different email address or login with your registered email address” if the registered email address is entered while the user is registering. I want to issue a warning, warning is easy but I couldn’t figure out how to create that condition block.
Firebase does all of the heavy lifting for you. Here is the condition you need to check:
if error = ‘Firebase: The email address is already in use by another account. (auth/email-already-in-use).’
Thanks for your help, I want to ask one more thing. There is at least one number requirement in the password, how can I get the error “You must use at least one number in the password” when it is not entered?
I didn’t put the condition, I think it’s automatic on firebase.
So firebase doesn’t require a number however you could do something like this to check to see if the password input text contains a number. If it doesn’t you can set an alert and say “must contain a number”
Here is a more or less complete example. You just need to add your firebase API key. In this example I check to ensure that the password contains a number. You could repeat the same process to check to see if there is a special character or if it’s a certain length.
Let me know if you need more help
Edit: I created a more concrete example: Project Link
Thanks for your efforts and interest.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.