code: function(value, attr, pattern, model) {
          if (!hasValue(value) || !value.toString().match(defaultPatterns[pattern] || pattern)) {
            return this.format(getMessageKey(this.msgKey, defaultMessages[pattern]) || defaultMessages.inlinePattern, this.formatLabel(attr, model), pattern);
          }
        }
docs: Pattern validator Validates that the value has to match the pattern specified. Can be a regular expression or the name of one of the built in patterns