Add validation rule for user defined regular expression.