code: function defaultValue(spec)
  {
    if (util.isRegExp(spec)) return "";
  	return ({
          "string": "",
          "id": null,
          "number": 0,
          "boolean": false,
          "date": new Date(),
          "regexp": new RegExp(),
          "function": function() { },
          "array": [],
          "object": {}
      })[spec];
  }
docs: TODO: copy from validate.js