Setting constraints for two string variables

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