You could set list validation to make a field mandatory based on a selection from another field in the modern list. For example, when test2 field =1, test1 field is mandatory.
1.Go to List settings -> Validation settings -> Use following formula.
=IF([test2] = "1", IF(ISBLANK([test1]), false, true), true)
2.Result.
If the answer is helpful, 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.