A common request when building Power Apps is to validate the email address of a textbox. This can be done easily using the IsMatch function. The function also does all kinds of validation using regular expressions. The Match.Email property can be used to automatically check if it’s a valid email.

If(
    IsMatch(
        txtValidationEmail.Text,
        Match.Email
    ),
    true // The email address is valid
    false // The email address is not valid
)

Here is an example where we have a TextInput control and an Icon control on the screen. The icon control shows a red error icon if the email is invalid, a green checkbox if it is valid.

The text is not a valid email address and shows the red error icon.

The text is a valid email address that shows the green check icon.

In the Icons Icon property, add the following.

If(
    IsMatch(
        txtValidationEmail.Text,
        Match.Email
    ),
    Icon.CheckBadge,
    Icon.Error
)

Now, in the Icon’s Color property, add the following.

If(
    Self.Icon=Icon.Error,
    RGBA(168,0,0,1),
    RGBA(141,198,63,1)
)