Re: Validation Logic in custom forms | Community
Skip to main content
Level 2
July 22, 2025
Solved

Re: Validation Logic in custom forms

  • July 22, 2025
  • 2 replies
  • 647 views

Hi,
I am trying to use Validation logic, but it is not working as expected. Here is my logic condition - User can write '2 Alpha' and '7 digit' hence in total it should be 9 without spaces.
I used this condition - 

IF(LEN({DE:Global | Global marketing campaign id})=9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)")
 
Issue - It is not showing the error message as expected.

 

Best answer by hnalbandyan

Thanks for trying.
To make sure I understand your case correctly, your original problem was that you wanted the field value to have 9 characters, right? The formula you have right now is saying if the field's length is 9 characters, show the error message. Hence, if you type anything expect 9 length words, you will not see the error. If the use case is to allow words with the length of 9, and to not allow everything else, you need to revert the equation sign.

IF(LEN({DE:Global | Global marketing campaign id}) !9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)")

2 replies

Adobe Employee
July 22, 2025

Thanks for reaching out. 
Could you please retry with double equation signs?
IF(LEN({DE:Global | Global marketing campaign id}) =9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)")

DikshaGa1Author
Level 2
July 23, 2025

Thanks for reverting back.
This still not working, I applied a rule not to extend more than 9 words, the error message doesn't come up if I extend the limit. Here is the screenshot.

 

hnalbandyanAdobe EmployeeAccepted solution
Adobe Employee
July 23, 2025

Thanks for trying.
To make sure I understand your case correctly, your original problem was that you wanted the field value to have 9 characters, right? The formula you have right now is saying if the field's length is 9 characters, show the error message. Hence, if you type anything expect 9 length words, you will not see the error. If the use case is to allow words with the length of 9, and to not allow everything else, you need to revert the equation sign.

IF(LEN({DE:Global | Global marketing campaign id}) !9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)")

July 22, 2025

One thing that often trips folks up is that validation logic does not work at all in Preview. In order to see your rule work, you have to save your changes and go find that form on a live record.