I know how Thomas Jefferson Esq. would answer but since he isn't around...
It would be legal if it is reasonably job related. Otherwise, I don't think so.