Validate generated dotenv file

Is there a way to see validation errors for a dotenv file, or recreate the validation Gitlab is performing? Trying to upload it with:

artifacts:
reports:
dotenv: variables.env

But we keep getting “FATAL: invalid argument” when the pipeline runs. Thanks!