How to validate dynamic radio button from PHP

Solution 1:

* Moved from the comment to answer section.

Add the required attribute to all input tags.

e.g:

<input type="radio" ... required>

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required