While users should still be allowed to enter genes using the gene symbol, they should be stored internally using Ensembl IDs.
User can enter genes using any type of ID
If they select something from the dropdown, we save the ensembl ID as the underlying ID
If they don't select anything from the dropdown, we server-side search for exact matches. If one match is found, we store the ensembl ID as the underlying ID. If none are found, we store the user-entered text as the underlying ID.
On page visualization, we include the ensembl ID in a hidden field and show the gene symbol instead (like we do with phenotypes/HPO terms). If there is no gene symbol, but the ID matches "^ENSG[0-9]+$", then we display it as a valid ID. If it doesn't match, we display it as a non-standard/invalid ID.