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
SujanSaiSujanSai 

i am trying to give a validation for number field, such as {blank or null is sould not give any error} and with same field if data is entered it should be limited to 0 to 10

sandeep sankhlasandeep sankhla
Hi Surya,

Please check with below link and let me know if it helos you..

http://regexlib.com/(X(1)A(XlsFvfNpNcmdlj1rgyBS__Ne05lirF-K4Oe-ba_ySl1izDUM4AelS1Vz5zpslcQzBpaSp-aRrJoGH1ES54a4rE6_2XHM9PHqTmW3D7YEE9chvXFLVD08Vz0ghpkSYrkkTRF8Qdayr4O2j5K0VBKaqsbta8u7SkhaZ2UKxl8AjjfXz0_tW_866VcO5-IkqTGx0))/Search.aspx?k=&c=3&m=-1&ps=20

Thanks,
Sandeep
David Holland 6David Holland 6
If the field is a number field then you can just do something like:
AND(
          NOT(ISBLANK(Custom_Field__c),
          OR(
                 Custom_Field__c < 0,
                 Custom_Field__c > 10
          )
)

 
JAY_PJAY_P
you can use and funtion and that in and u have to use or function for value it select 0 to 10 only llike this


AND( NOT(ISBLANK(Custom_Field__c), OR( Custom_Field__c < 0, Custom_Field__c > 10 ) )
Thank you
 
David Holland 6David Holland 6
Mike, you do realise you have just written exactly what I have written, but 4 months later....
Jeet PadhyaJeet Padhya
The only change i would suugest is using "<=" and ">="