Online courses available on online portals like Udemy, Unacademy, Coursera and Vskills etc. are definitely good and also have validity. These courses are run by reputed universities. Course contents are also of good quality. Mostly, these courses are of short duration about 1-2 months. Some specialized courses may be of longer duration. Besides, if you compare cost wise, an online certification course will cost you less while regular course will more.
These courses are specially designed for a particular functional areas and focus mainly of that particular area. They are more job oriented courses. The main drawback of these courses is that these are online courses, and they definitely don't provide field/practical work experience that you can get in a regular class. But if you are already in job and don't have much time to attend a regular course or looking for a particular functional area course you can go for it. Validity is not an issue.
Further, if you have degree, experience and relevant certification then it has more value than a candidate with only degree and experience. And some of the courses are only available in online mode so that a person can study according to his/her convenience and also give exam according to his choice. You can buy these courses online and register yourself, study from home or office and learn. And these courses are open to all and anybody can do these courses. By doing these courses you can increase your knowledge and skills. Hence these courses definitely have value. Compare the course available on various websites and decide yourself. Considering these points you can do online certification courses.