function addFormat(name, format) {
  if (typeof format == 'string') format = new RegExp(format);
  this._formats[name] = format;
}
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)