The POSIX standards on shells section of IEEE Std 1003.1-2008 / IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard doesn't define the lexical convention for variable names, nonetheless, as described here, we could make sure the value comply with regex ^[a-zA-Z_][a-zA-Z0-9_]*$ in order to cover most usecases.
Having it in is would help validating environment variables