Are online TESOL courses valid?

This depends what you mean by valid. In terms of whether an online TESOL certificate is accepted or not, it depends largely on the employer and the government rules of the country you plan to teach in. Most courses have an online and in-class component, known as blended learning. These are great ways of doing a percentage of the course practically, followed by distance learning. You will need to do research to see if this fits with your job goals though.