User Input wiht NULL

User Input wiht NULL

Hello,

i have this script on Validate:

  1. if ((input.Office_ID).length()  !=  9)
    {
        alert ("Office ID Amadeus must be a length of 9!");
        cancel submit;}


how can i change the script, when the user dosen't input any value? this field has don't be a required field.

thanks
Carsten