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
Siva SakthiSiva Sakthi 

How to set the validation for DOB as Text Field not in Future Year?

Hi ,

 I have DOB as Text Field, I want to given the validation for this text Field (DOB) ? 

My Sample Validation is : TEXT(SitEduTest__Academic_Year__c  < Today())  
            But it causing  Error: Incorrect parameter type for operator '<'. Expected Text, received Date.  How to achive this guide me .

Thanks
Maheshwar 
Best Answer chosen by Siva Sakthi
Vinoth Vijaya BaskerVinoth Vijaya Basker
Please try the below formula, 

VALUE(SitEduTest_Academic_Year__c) > YEAR(TODAY())


Thanks,
Vinoth

All Answers

Vinoth Vijaya BaskerVinoth Vijaya Basker
Hi Maheshwar, 

Please try the below formula, 

DATEVALUE(SitEduTest_Academic_Year__c) > Today()

I have tried with Date format : 2015-09-15


Thanks,
Vinoth



 
Siva SakthiSiva Sakthi
Thanks Vinoth.

 I have one more doubt In my text field i have entered only year (2000,2015, etc..) I want to validate the current year validation. Like any body enter future year means throw an error. 2018,2017 etc....

How to achive this only year validation in the Text field.

Advance Thanks
Maheshwar
Vinoth Vijaya BaskerVinoth Vijaya Basker
Please try the below formula, 

VALUE(SitEduTest_Academic_Year__c) > YEAR(TODAY())


Thanks,
Vinoth
This was selected as the best answer
Siva SakthiSiva Sakthi
Thank you ! Its working Fine