function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mac SwiftMac Swift 

Http Https Validation Rule

I want to create a validation rule in custome URL field that it should start with  "http" or "https". Again CONTAIN function has case sensitive issue. So I need to create a validation rule which will address the issues like - http or Http or HTTP.

Please help me to resolve the issue
Magesh Mani YadavMagesh Mani Yadav
Hi Mac,
Use this validation. This will bypass case sensitive http/https
 
​NOT(REGEX( Website , '^(?i)(http|https)://.*$'))

 
Mac SwiftMac Swift
Its not working. Got the syntax error
Mac SwiftMac Swift
You wrote "website" in the validation rule. Just wanna be clear its for the custom URL field.
Magesh Mani YadavMagesh Mani Yadav
Hi Mac,
I used lead object field "website" . You can add your custom URL field in that validation.