Hi and welcome, @Mosab_English! Please be sure to post a new topic if you have a new question. If you think a topic may be related, please link to it rather than responding to the topic.
A constraint is exactly what you want in this case. A user will not be able to save the form until a constraint is satisfied so although they could have an answer that is not valid initially, they will need to fix it before the form can be completed.
There are a few examples of constraints you can use in past forum questions including Creating contraints on select_multiple - #5 by Bill_Olander. For your example, that would be something like
if(selected(., '0'), count-selected(.)=1, count-selected(.)>=1)