Hi @Dondon510 ,
You can use the custom validation to build a conditional validation, refer the following sample:
- Create a UserProfile model:

- Create a RequiredIfAttribute class:

- MVC controller:

- The View page:
Add the following scripts to achieve the custom client side validation: 
You can view the above source code from here: 226071-customvalidation.txt
Then, the output as below:

If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Dillion