Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Is it possible to validate that an input is of type email?

Is it possible to validate that an input is of type email, so that if the user enters something that is not an email, a warning can be showed?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    If you mean you want to validate that a particular string is a valid email address, the People Funcitons plug-in currently has a function, validateemailaddress(), which validates email addresses as well as any Regex pattern or OOB appian expression can do (and i know because i've written both in the past from scratch).

    If you go with the RegEx approach as other commentors have suggested here, the best pattern I've found so far which accepts the largest range of valid email addresses, is as follows (this is the actual expression rule I currently use):

    regexmatch(
      pattern: "^[A-Z0-9\'\+\&\%_-]+(\.{0,1}[A-Z0-9\'\+\&\%_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$",
      searchString: ri!email,
      regexFlags: "si"
    )

    Note, the "validateEmailAddress()" function in People Functions currently passes the same extensive list of test cases as the above expression rule, and is a little easier to use routinely.

Reply Children
No Data