Add required attribute to dynamic rendered tag in htmlform

Hello Friends, Greetings to you all.

Please I have obsgroup that I render the input groups dynamically but when some fields are skipped in one row and the same field filled in the next row, the last one will automatically save in the previous row.

I have added required attribute to each input group onClick of the add button but the form still submits without those fields field.

Please, anyone with useful hints on how I can achieve this should kindly assist me.

Thank you