code: function (value, constraint) {
          var pattern = asRegExp(constraint.value);
          return valdrUtil.isEmpty(value) || pattern.test(value);
        }
docs: Checks if the value matches the pattern defined in the constraint.
  
  @param value the value to validate
  @param constraint the constraint with the regexp as value
  @returns {boolean} true if valid