How to validate two part of fields in same form?

Hai,
I have write ten number of fields in my form it separated by one radio button when i click radio button it shows another five fields. When it shows another five fields it should be validate that all fields otherwise not.
How i handle this validation in validationDefault() function.

Thank you.

Please mention the version of framework

Here I am using cakephp 3.

You can apply conditional + custom validation to your problem please refer this link
https://book.cakephp.org/3.0/en/core-libraries/validation.html#conditional-validation

Thanks for your reply.