Validation improvement - conditional add class instead of $.toggleClass