Setting constraints for two string variables

I am entering the plates number(example: RA078VA), I am entering at the same time new plate number and old plat number. I want to set a constraint message if enumerator duplicates the the plates then the tablet will display a constraint message or note
for example ${old_plate} for entering old plate
${new_plate} for entering new plate
Enumerator mistakenly can enter the same plate number for both old and new variables. I want to set a constraint or note that checks if ${old_plate}=${new_plate} if they are the same it must display a message to inform enumerator that he/she entered the same plate for both old and new variables.
Any support is appreciated

Maybe this post discussed previously should help you solve your issue: