lib/ajv.js
function addFormat(name, format) {
  if (typeof format == 'string') format = new RegExp(format);
  this._formats[name] = format;
  return this;
}
function addFormat(name, format) {
  if (typeof format == 'string') format = new RegExp(format);
  this._formats[name] = format;
  return this;
}
function addFormat ( name , format ) { if ( typeof format == 'string' ) format = new RegExp ( format ) ; this . _formats [ name ] = format ; return this ; }
Add custom format
@this   Ajv
@param {String} name format name
@param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
@return {Ajv} this for method chaining
Add custom format