Avatar

Level 10

Whoops. Try this instead. It will test the presence of a value before testing the day.

// form1.page1.subform1.dayOfWeek::validate - (JavaScript, client)

if (!(this.isNull || this.rawValue.length == 0)) {

     if (this.rawValue != "Sun") {

          xfa.host.messageBox("The selected date is not a Sunday.");

     }

}