You are here

PowerApps- Field Validation in the submit form function. phone and Email

For the Icon or button you use for a form submit.  Place formula in the "OnSelect" property.
(Tests for "true", a true result: submit the form, false result: it displays an error message on top of the page.)

If(IsMatch(DataCardValue3_1.Text, 
           "^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$")
           And (IsMatch(DataCardValue7_1.Text, 
            Digit & Digit & Digit & Hyphen & Digit & Digit& Digit& Hyphen & Digit & Digit & Digit &Digit)),
   SubmitForm(applicantInfoForm),
   Notify("Fields not valid on this page, please check", NotificationType.Error)
)

 

Outcome: