Don't allow general emails like "Outlook", "gmail" etc on signup?

Hello, i’m currently trying to develop an app that i only want companies domains as email when signing up like Dan@Bubble.io and not Dan@gmail.com

I have been trying to figure it out and reading a lot of posts but no luck, i’m a beginner!

Thankful for any help :grinning_face_with_smiling_eyes:

1 Like

Bumping this thread, still no luck :frowning:

Something you can TRY. Add a text box ( with the text “You can only use a private/company email” ) under the input email. set condition on the text box, only visible when input email is not empty.

set another condition on the text box. when input email value doesn’t contain “gmail.com” “outlook.com” etc the text box should not be visible.

finally, on the sign up button, add a condition. when text box “You can only use a private/company email” is visible, this element is not clickable.

If this works, it should only be a temporary measure until you find a better way to do it

You can add a condition to the signup workflow.
Assuming you have a list of text of forbidden domains you check that email :splitby"@" :last item :is not in :list of forbidden domains

I have a data type “Blocked emails” and that has a list of texts called “email domains” and in there is google etc, how would i go about doing the condition on the signup button?

Something like email :splitby"@" :last item :is not in :do a search for blocked emails :first item :email domains

1 Like

Is that a condition then on the button so if this is → Button is not clickable? or is it a workflow for the signup button?

I would create a workflow with this condition that allows to signup, and another workflow with the opposite condition that shows a notification to the user saying that the email is not allowed.
A condition on a workflow is stronger than a disabled button.

1 Like

Screenshot 2023-02-10 at 14.10.19

Do i just make it “only when” in the workflow, or make a new action? How would i go about that? :grinning_face_with_smiling_eyes:

it’s easier if you create two different workflows, triggered bu the same event but with opposite conditions (only when)

I cant seem to understand email :splitby"@" :last item :is not in :do a search for blocked emails :first item :email domains, when i click on “only when” what do i start the condition with? only when input email/signup's value…? or?

wherever you get the email from, input value, state, anything that gives you the email as a text

  1. Get this list: Common Email Domains · GitHub

  2. Convert the list above to a JSON and upload it to your Bubble file manager.

  3. Create an API call to this json file and get the results.

  4. At signup, :extract the email’s domain, compare it with the Get data from external API above, and create your rules :slight_smile:

2 Likes

I’m going crazy i don’t understand what i’m doing wrong…
Where i get the email from: input “emai login/sign up”
Where i store the blocked emails: Custom datatype called “BlockedEmails” and in that i have a text filed called “EmailDomains”

And right now im in the “sign up” buttons workflow on the “Sign the user up” state and looking at the conditions?

I’m sorry I’m a beginner, that’s way too simplified version of an explanation for me to follow haha… :frowning_face:

Hi there, @Supfel… here is an example where an option set is being used to define the blocked domains, and this is the workflow event that will show an alert instead of signing the user up.

You would have another workflow event that looks the same except it would be count = 0, and that workflow would sign the user up.

Hope this helps.

Best…
Mike

1 Like

Thank you Mike for your input! Gosh i dont understand why i find this so hard to understand, i understand everything else but this problem is making me crazy…

I dont understand how you can start the condition with (All OS…) what is that?

I have the following information if you can help me out:
Where i get the email from: input “emai login/sign up”
Where i store the blocked emails: Custom datatype called “BlockedEmails” and in that i have a text filed called “EmailDomains”

And right now im in the “sign up” buttons workflow on the “Sign the user up” state and looking at the conditions?

It’s an option set called OS Blocked Email Domains. I would use an option set instead of a custom data type, and I showed you how to set up the condition if you are using an option set.

If you want to use a custom data type, the concept is the same as what I showed, except you would do a search instead of filtering options from an option set. So, something like this…

1 Like

This is my workflow now, however when in click signup with “Bob@bubble.io” nothing happens, i cant sign up with that domain even tho it’s not blacklisted?

Wait you did that condition on the button maybe? i did it in the Sign the user up workflow?

You have the condition on the workflow action… you need to put it on the button click event.