Username Character Restrictions / Limits

I want to restrict what characters someone can use for a username as I am also using the username for another application with the following restrictions

can contain only letters, digits, ‘_’, ‘-’ and ‘.’. Cannot start with ‘-’ or end in ‘.’, ‘.git’ or ‘.atom’.`

Any way to limit this on Keycloak?

Thank you