I've worn a beard for the past 10 years but one of my early jobs required that I wear a respirator and I was told that I could not have a beard because it made the respirator less effective.
So my answer to that is any employer should be able to enforce any dress code he sees fit including grooming as long as it is enforced universally within the company. And sorry but it seems to be a no brainer not to allow people to wear loose flowing clothing around machinery.
I saw a guy's shirt sleeve get pulled into a planer once. The guy lost 3 fingers all because his shirt cuffs were unbuttoned
http://www.safetynewsalert.com/loose-clothing-claims-2-workers-lives-in-2-incidents/
And who pays when the employee is careless? The business owner.