code: function (element) {
              // Begin with checking the validate
              var elementAsArray = [ element ],
                  validationType = element.getAttribute("data-validate") || null;
                  invalidElement = [];
              if (validationType !== null) {
                  validationType = this.splitStringByComma(validationType);
                  for (var i = 0; i < validationType.length; i++) {
                      invalidElement = this.getElementsByPattern(elementAsArray, this.patterns[validationType[i]], validationType[i]);
                      if (invalidElement.length > 0) {
                          this.currentValidationType = validationType[i];
                          return false;
                      }
                  }
              }
              // As data-validate="length" has already been checked,
              // only check the elements with data-length set.
              if (element.getAttribute("data-length") === null ||
                  validationType !== null && validationType.indexOf("length") !== -1)
                  return true;
              validationType = "length";
              invalidElement = this.getElementsByPattern(elementAsArray, this.patterns[validationType], validationType);
              if (invalidElement.length > 0)
                  return false;
  
              return true;
          }
docs: Validates a single element. Used as callback on invalidated
  elements to check when they are valid.
  
  @param       element     The element to check.
  @returns     bool        True on valid