Skip to main content
Participating Frequently
Sep 14, 2022 6:10 AM UTC
Solved

How to validate URL in filelocation field

Hi , 

kindly suggest validation for URL. 

thanks in advance

    harshitb6843
    Brainy
    Sep 14, 2022 6:21 AM UTC

    Regex will work like a charm but you can also use code like left(local!URL,8)="https://"

    6 replies

    harshitb6843
    Brainy
    Sep 14, 2022 6:11 AM UTC

    You can use a regex to validate the syntax of the URL but to check fi the URL is live or not, you might have to use a service. 

    Participating Frequently
    Sep 14, 2022 6:14 AM UTC

    without regex cant we use?

    harshitb6843
    Brainy
    Sep 14, 2022 6:14 AM UTC

    What actually do you want to validate? 

    puneets0004
    Participating Frequently
    Sep 14, 2022 6:18 AM UTC

    please refer the below regex for validate the URL (Valid or not).

    regex = “((http|https)://)(www.)?” 
    + “[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]” 
    + “{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)”