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
Lorenzo WilliamsonLorenzo Williamson 

Validation query

Hi Guys,

Forgive me if I'm missing the blatantly obvious here, I'm still relatively new. I would like to have the validation rule below apply only when the field is not blank, I've been having trouble constructing the right syntax to achieve this.

NOT(BEGINS(Phone,"00")) || NOT(ISNUMBER(Phone)) || CONTAINS(Phone,".")

Any help is much appreciated

Thanks

Best Answer chosen by Lorenzo Williamson
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Lorenzo Williamson:

 Is this what you are looking for!
 

NOT(ISBLANK(Phone)) && ( NOT(BEGINS(Phone,"00")) || NOT(ISNUMBER(Phone)) || CONTAINS(Phone,".") ) 


  

All Answers

Pankaj_GanwaniPankaj_Ganwani
Hi Lorenzo,

What is the name of the field for which you want to check for not blank. Is it Phone?
If so, use NOT(ISBLANK(Phone)) in validation rule definition.
Lorenzo WilliamsonLorenzo Williamson
Yes Phone is the name of the field. I had already tried to include NOT(ISBLANK(Phone)) before posting this, that's where I'm going wrong though. How can I include this statement so that it coincides with the others in this rule?
Pankaj_GanwaniPankaj_Ganwani
Please try with it:
AND(NOT(ISBLANK(Phone)),(NOT(BEGINS(Phone,"00")) || NOT(ISNUMBER(Phone)) || CONTAINS(Phone,".")))
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Lorenzo Williamson:

 Is this what you are looking for!
 

NOT(ISBLANK(Phone)) && ( NOT(BEGINS(Phone,"00")) || NOT(ISNUMBER(Phone)) || CONTAINS(Phone,".") ) 


  
This was selected as the best answer
Lorenzo WilliamsonLorenzo Williamson
Thank you both for the help. Balaji that works perfect, much appreciated!!