How to Use the Yii2 Compare Validation

The rules go in your model e.g. app/models/Participant.php. In this example, I’m ensuring that the participant_id and the invited_by id are not the same. I don’t want someone to be able to invite themselves.