Password validation added to class