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.
@zander
@manyone
Firebase does all of the heavy lifting for you. Here is the condition you need to check:
If error:
if error = âFirebase: The email address is already in use by another account. (auth/email-already-in-use).â
do alert.
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.