These operators send an error message if the previous condition was met. .setError sends the same message in all cases, while .setQSetError can be used to customize the error message depending on the selected question set; for example:

.setError("Start time must be before end time.")
.setQSetError("English", "Start time must be before end time.")
.setQSetError("French", "Heure de début doit être avant l'heure de la fin.")

ifQ(21)
.answered()
.andQ(31)
.equalTo(Q(21))
.setError("Q21 and Q31 should not be the same");


// you can optionally associate a question in the error msg .setError("Error!", Q(21))


ifQ(31)
.answered(2)
.setQSetError("English", "OMG Error!")         // question not required
.setQSetError("French", "OMG l'Err!", Q(31));