Of course.
But if the dress code is written down somewhere, it's her responsibility to know what's allowed and what isn't.
It sounds like this was the first time they actually enforced the rules. Or maybe the rules had changed.
Her defense so far has been: I was allowed to break these rules before. Why was I not allowed to break them this time?
Again, I'm on her side, but if, as in a NASCAR garage, the rule states: No Open Toed Shoes, why risk wearing open toed shoes?
You're daring a prison guard to enforce a rule.