Conditionally Required Field

Conditionally Required Field

I'm trying to conditionally require two fields to be filled (ie, not EMPTY) BEFORE a specific lead status is used:

on validate
{
if ((input.Lead_Status == "3. Qualified Lead") && ((input.Forecasted_Monthly_Revenue == "") || (input.Forecasted_Hourly_Rate == "")))
{
alert "enter BOTH Forecasted Hourly Rate an Forecasted Monthly Revenue";
cancel submit;
}
}
This code sample is as close of a mirror as what I found in the documentation here:  https://www.zoho.com/creator/help/script/app-builder-deluge-scripting.html#fieldmandatory

Whenever I try to save this function I get:

Failed to update function
Error at line number:   2
Improper Statement
Error might be due to missing ';' at end of the line or incomplete expression
I'm dropping this code in as a Function under:

Setup > Automation > Workflow Rules > On a Record Action > Lead Status = 3. Qualified Leads > Instant Action > Function > Write your Own
I'm not sure where I'm going wrong - any help would be much appreciated!