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.

  • 1
    Possible duplicate of Validation Rule for URL – Derek F Jan 21 '19 at 15:03
  • 1
    You seem to be asking the same question multiple times. Can you explain how this question is different from your previous ones? Have you tried any of the suggestions you've gotten so far? Usually, if your questions are being closed, that means that you need to include additional information or ask the question in a different way. I'd strongly suggest reading How to Ask. Also, what have you tried so far? The purpose of this site is not so much "do my work for me" as it is "here's what I have, I'm stuck on this part, how can I move forward?" – Derek F Jan 21 '19 at 15:08

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

      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

Examples of Validation Rules

Create Validation Rules - Trailhead

| improve this answer | |
  • Even if it is blank then it is asking for the particular URL: Sorry for updating late that it may be blank also. – Abhijeet Kumar Jan 21 '19 at 15:04
  • @AbhijeetKumar I've updated the code for your requirements and included a couple links that should help you learn validation rules, aswell as some examples to use! Have a read of How do I ask a good question? for the future! – David Picksley Jan 21 '19 at 15:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.