I have customised a sharepoint list form for edit/new and one of the fields is the email. How can I perform email validation so that it is not saved when the email is not valid. For more info please refer to the screenshot below
You can try using the IsMatch function when validating the input before it is submitted.
IsMatch( "joan@contoso.com", Email )
Here is the documentation: IsMatch function in PowerApps
Thank you Jeff, I understand - where am I using the formula though ? I am using the standard sharepoint save button...
Hi @iioannou,
Please follow below steps:
1. Suppose that DataCardValue12 is the name of the label control that stores the email. Set the OnSelect property of your save button to:
If(IsMatch( DataCardValue12.Text, Email )=true,SubmitForm(EditForm1),UpdateContext({Var:true}))
2. Insert a Label control, set to:
Label1.Text="*The email is not valid."
Label1.Color= RGBA(255, 0, 0, 1)
Label1.Visible=Var
3. Set the OnSuccess property of the EditForm1 to:
Back();UpdateContext({Var:false})
I just tested and this works for me.
Regards,
Mona
Hi Mona,
I dont have a save button - I am using the default save button of sharepoint. What do I do in that case ?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
205 | |
97 | |
60 | |
51 | |
49 |
User | Count |
---|---|
255 | |
158 | |
87 | |
79 | |
59 |