How to create a function that validates an email input

Options

HI,

I am trying to create a global function that validates an email address input when called.

I cant seem to find a simple function/way to check if an email address is valid. I am working with a conditional IF statement but hoping for some guidance on where to look?

Thanking you

Tagged:

Best Answer

  • lesa
    lesa Member, Administrator

    ADMIN

    Answer ✓
    Options

    Hi Ken,

    I would recommend using our SendGrid snippet to send your users emails to confirm their email. If it is merely about formatting, I would recommend you do a check in the front end because Xano will, by default reject an incorrectly formatted email if the input is set to accept email value types.

    If you are passing it through a text field type, Another option to try would be using a regex. Here's a resource to reference and a video tutorial on this feature.