Error alert if email is invalid

How can I show an error alert when the user enters an invalid email in the Input field? For example: I want the alert message to appear if the user enters an email that does not contain @fake.com . How can I do this? The alert appears even though I put the domain I want

Hi there, @kerenswan… are you saying you want to check to make sure an email address is properly formatted or that an email address contains a certain domain? If it’s the former, you don’t have to do that because an input element with a content format of Email automatically checks that for you. If it’s the latter, it should be simple to set up, but it depends on what you mean by “alert” and when/how you want the alert to appear. Can you share some screenshots of what you have?

Best…
Mike

It’s the latter. Let me show you what I have:


image

The toast is the customizable message that I set to appear when the email domain does not contain the one I want it to have

Thanks for your help!

Sorry, but I don’t understand what you are trying to do there. If you want to show the alert if the email that has been entered into the input doesn’t contain @groupAJ.com, can’t you just do this?

What does the search have to do with it?

I don’t know why I had put Search before! Thank you! It worked

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.