I have a requirement that in Filed client_Logo__c(URL) whenever user enters any URL : IF it dosen't begin with http or https then it must throw a validation error.
closed as off-topic by Derek F, David Reed♦, Reshma, Himanshu, Pranay Jaiswal Jan 21 at 18:29
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – David Reed, Reshma, Himanshu, Pranay Jaiswal
Welcome to the exchange!
Have a look at the following link for some more in-depth explanation Click me!
For your case, if this is a default field, create a
Validation Rule on your object.
Error Condition Formula
NOT( OR( BEGINS( client_Logo__c, "http"), BEGINS( client_Logo__c, "https"), ISBLANK( client_Logo__c ) ) )
The rest (Rule Name, Error message) can be whatever you like
Edited: Updated formula for further requirements
Have a look at the following