Hi,
I am using this code for validating link in the form
!IsMatch(DataCardValue2.Text, "(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$")
also tried
"(([\w]+:)?//)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,63}(:[\d]+)?(/([-//+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?"
//)
But its not validating the SharePoint and Teams link like below,
https://name.sharepoint.com/sites/filename/_layouts/15/Doc.aspx?OR=teams&action=edit&sourcedoc={38B53388-9C2E-4D09-964A-813B747F455A}
and
https://teams.microsoft.com/l/file/38B54543-9C0E-4D09-964A-813B737F475A?tenantId=258ac4e4-146a-411e-9dc8-79a9e12fd6da&fileType=pptx&objectUrl=https%3A%2F%2Fname.sharepoint.com%2Fsites%2filenamefilenamefilenamefilenamefilenamefilenamefilenamefilename.pptx&baseUrl=https%3A%2F%2Fname.sharepoint.com%2Fsites%2filename-filename&serviceName=teams&threadId=19:5f2346fc521142ccbb22d38d1edeca68@thread.tacv2&groupId=183435fddb-7ef6-7587-a107-6ecbe64353e5
It says invalid link, anyway to fix this.
Thanks,
Solved! Go to Solution.
Hi @ramanan89 :
Please try this code:
IsMatch(DataCardValue2.Text, "(?:http(s):\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-\.,@?^=%&:/~\+#\{\}]*")
Best Regards,
Bof
Hi @ramanan89 :
Please try this code:
IsMatch(DataCardValue2.Text, "(?:http(s):\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-\.,@?^=%&:/~\+#\{\}]*")
Best Regards,
Bof
This Works... Thank you so much 🙂
I wonder for the Hyperlink in columns list, max character limit is 255 in SharePoint. But for the share link in Teams itself is more than 255 characters.. 😄
This does not work if pasting from a Copy Link dialogue from SharePoint with "x:, w:" and other characters in the link.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
192 | |
67 | |
46 | |
41 | |
22 |
User | Count |
---|---|
246 | |
120 | |
83 | |
76 | |
69 |