I am new to validation rules and could use some help. I have a date field for users to fill out for their date of birth. This field requires them to use the "calendar" and many are not selecting the year they were born, but leaving it for current year. I want a rule that will ensure the user is selecting the right year and have it verify they are at least 18 years of age. I have created a formula:

TODAY() >= ADDMONTHS({!Date_of_Birth},216)

and included in my flow, but it's not allowing the user to move forward in the flow. enter image description here

  • 1
    Welcome to SFSE! Please take the tour and read How to Ask. Showing us what you've tried so far and the research that you've done is important (otherwise this is more of a "do my work for me" request). Please edit your question to include that. If you're new to Salesforce (or a part/feature thereof) then trailhead.salesforce.com is going to be a better place to get you started. More specifically, the Formulas and Validation module (part of the larger "developer beginner" and "admin intermediate" trails)
    – Derek F
    Commented Jun 27, 2023 at 18:47
  • 2
    Also, if you're encountering an error message while trying to create this validation rule, you should definitely include it (word-for-word). If you have a validation rule but it doesn't seem to work, then giving us examples of input where you think it should be working is important. In a nutshell, the more details you can provide, the better.
    – Derek F
    Commented Jun 27, 2023 at 18:54

1 Answer 1


Validations trip when the rule is equal to true, so you probably meant:

TODAY() < ADDMONTHS({!Date_of_Birth},216)

This rule should trip when the user is younger than 18 years old. We're adding 18 years worth of months to the entered date, and if that date is greater than today, then that means they are not yet 18.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .