fix bug with radio and checkbox validation

This was introduced with #5738.

The statement was in the wrong line. This fixes a bug where the validation of radios and checkboxes was not recognized in the final validation result.

Now it works great :)
Merge pull request #5782 from christianseel/patch-7

fix bug with radio and checkbox validation