@first check the version that u r using, bcuz latest version ofvalidator support validwhen.Otherise u can try to use requiredif either.I've some samples whenever u want just put on a message.