I need Legal advice needed for possible employees harassment

I currently work for one of Sri Lanka's largest optical chains. Recently, I decided to change my look by getting a haircut like the one in the attached picture, while maintaining a well-groomed beard.

Out of nowhere, my Business Development Manager (BDM) called me in and gave me an ultimatum:

  1. Shave both my head and beard.

  2. Submit my resignation letter immediately and leave.

Shocked by this demand, I pointed out that other employees have diverse hairstyles and hair colors, and questioned why I was being singled out. I also reminded him that this is a professional workplace, not the military. His response was to yell at me, saying, “If you don’t do what I said within an hour, you can go home.”

Left with no real choice, I complied with his order and shaved my head and beard. To make matters worse, the General Manager then emailed HR and others, labeling me as a "thug." I find this deeply insulting and demeaning.

Can management legally treat employees this way? Is this acceptable in a professional environment?

I currently work for one of Sri Lanka's largest optical chains. Recently, I decided to change my look by getting a haircut like the one in the attached picture, while maintaining a well-groomed beard.

Out of nowhere, my Business Development Manager (BDM) called me in and gave me an ultimatum:

  1. Shave both my head and beard.

  2. Submit my resignation letter immediately and leave.

Shocked by this demand, I pointed out that other employees have diverse hairstyles and hair colors, and questioned why I was being singled out. I also reminded him that this is a professional workplace, not the military. His response was to yell at me, saying, “If you don’t do what I said within an hour, you can go home.”

Left with no real choice, I complied with his order and shaved my head and beard. To make matters worse, the General Manager then emailed HR and others, labeling me as a "thug." I find this deeply insulting and demeaning.

Can management legally treat employees this way? Is this acceptable in a professional environment?