Yes, an employer is entitled to guide their domestic assistants to dress "generally" decent.

I consider wearing pants as being very decent, safer, and a whole lot better than dresses and skirts. But that's a personal preference.