Field Null Validation not working
Hi All,
Here is my code:
- varLeadTime = ((input.Coaching_Start_Date - input.Entry_Date) / (1000 * 60 * 60 * 24));
- if ((varLeadTime < 7) && (input.Why_now_Compelling_event_and_timelines_ == null))
- {
- alert "This is less than 1 week notice. Please complete the 'Additional Information' section (Why Now?) to help us prioritize.";
- cancel submit;
- }
Basically, it is a calculation of how many days notice someone provides for a request. If it is less than 7 days, the user must complete the field 'input.Why_now_Compelling_event_and_timelines_'/.
The issue I am having is, the form is not detecting that the field is null and allows submission. The field being checked for null is a multi-line field.
What am I doing wrong?
Thanks
KP.