I want to add constraint msgs, so that i can show messages instead of some input violation pop-up.
You cannot add constraint messages to CDT's. You can just set a constraint expression on the CDT
If the constraint you place on the CDT fails for the rule/rulesheet , the Rule Message Violation/Warning will automatically pop up based on property com.corticon.vocabulary.cdt.relaxEnforcement=true/false
This is an option to relax the enforcement of Custom Data Type Constraints. When set to true, a CDT violation will post a warning message and execution will continue. When set to false, a CDT violation will cause an exception to be thrown halting execution. Default is false (com.corticon.vocabulary.cdt.relaxEnforcement=false)