locked
How to check null value? RRS feed

  • Question

  • Hello to all....

    How could i check if the attributes was null?

    var TinNumber = crmForm.all.new_tin.DataValue;
    var regexFormat = /[0-9]{3}-[0-9]{3}-[0-9]{3}-[0-9]{3}/;

    if (TinNumber is null )
    {
         if ( ! regexFormat.test(TinNumber) ) {
            alert("The TIN number must match the following format: ###-###-###.");
            event.returnValue=false;
            return false;
    }
    }
    Zosimo D. Recio Jr. Microsoft Certified (Business Management Solutions specialist)
    Wednesday, July 1, 2009 2:27 AM

Answers

All replies