First of all, why don't you use field validation instead of javascript/jQuery validation? it's easier, you can check validation rules here: https://msdn.microsoft.com/en-us/library/bb862071.aspx
If you want to stick with javascript, you validation might be failing because while you don't write anything on the field, the field is not equal to "", the field
is equal to null. change your condition to if(x==null || x==""), and test again