validation message display in class instead of visibility