How to add validations to Organization names

I am working for an organization which is using Enterprise GitHub.
We have requirement to enforce validations on the GitHub Organization name while creation of the same.
For example, we would like to allow creating an organization name that should start with “ABC-”.

Could you please help us if there is any way that we can implement this. Thanks in advance

:wave: Welcome!

There isn’t a setting built in, but if you’re using Enterprise Server (self-hosted), you could create a rule like that using global webhooks.

This would require an application for the org creation webhooks to be sent to, which would execute the naming convention business logic. This application could take further steps as necessary, from messaging the appropriate person to using the GitHub API to change the organisation name.

Thank you very much @canuckjacq,

This would really help us.

One more clarification regarding the validations that we can implement on the UI. Could you please suggest if there is a way that we can implement validations at the UI level.

For example, the existing Organization names can accept only alphanumeric characters with “-”. Could you please suggest how these are implemented so that we can extend these validations to our requirement.

Additionally, kindly suggest if we can utilize GitHub APIs to rename an existing Organizations.

Thanks in advance

Hi @canuckjacq,

Could you please help to review above clarification and suggest. Thanks in advance.