Email verification

0
Hi, I'm hoping someone may be able to help me. I'm very new to Mendix and I apologise if this has been answered elsewhere, but I can't see anything as specific as what I'm after. I'm writing a microflow that is attached to a save button that will verify that an email address has been added in one of my fields. I'm not looking for a specific email address from a list, just to check that something looks like an email address. I hope that makes sense! What I need the micro flow to do is recognise that the field ends a certain way (@hotmail.com for example) and other than the @ sign there, no special characters are to be used. I've very much ran out of ideas on this one so any help would be hugely appreciated! Thanks, Sean.
asked
3 answers
0

Sean,

You can use the match function with a regular expression.

e.g. isMatch($entity/attribute, 'regex expression') this will check if the field contains an email address when using the correct regex.

For email regex expressions have a look at http://www.regular-expressions.info/email.html

answered
0

Sean,

There are a number of ways to do this, many of them are covered here:  https://docs.mendix.com/howto50/setting-up-data-validation

Comparing a string to a regex for validation in a microflow is discussed in this post: https://forum.mendix.com/link/questions/3133

Also, a recently published widget in the App Store called InputBoxOctober provides this capability (not sure why its named that, but I have used it with good results.  You can find this widget here:  https://appstore.home.mendix.com/link/app/4625/Mendix/InputBoxOctober

Hope that helps,

Mike

answered
0

This topic has been covered quite a few times on this forum. Personally, I favor Nikel's approach from this thread.

answered