As a web dev: if you want to limit the input to a specific set (male, female, other) USE A FUCKING SELECT FIELD! Text input is just objectively wrong here.
And if you want to allow for a broad spectrum of genders without discrimination why is it validated?