types.js
function (string) { // string.check check sting type and size

            return ((typeof string === 'string' || string instanceof String)
                    && string.length >= this.min
                    && string.length <= this.max
                    && (!this.match || string.match(this.match))
                   );
          }
function (string) { // string.check check sting type and size

            return ((typeof string === 'string' || string instanceof String)
                    && string.length >= this.min
                    && string.length <= this.max
                    && (!this.match || string.match(this.match))
                   );
          }
string.max Maximum length of the string