How to validate multiple ajax based comobo box?

Dear All,
I have one combob box with numbers in it. For ex. if I select 2 then 2 combo box with same value will be populated below using ajax technique. The problem now I want to do validate is that both must not be empty and both can have the same value selected. How to do this because there are dynamically generate? Any idea please?