lib/validator.js
function Validator(opts) {
	this.opts = {
		messages: deepExtend({}, defaultMessages)
	};

	if (opts)
		deepExtend(this.opts, opts);

	this.messages = this.opts.messages;
	this.messageKeys = Object.keys(this.messages);

	// Load rules
	this.rules = loadRules();
	this.cache = new Map();
}
function Validator(opts) {
	this.opts = {
		messages: deepExtend({}, defaultMessages)
	};

	if (opts)
		deepExtend(this.opts, opts);

	this.messages = this.opts.messages;
	this.messageKeys = Object.keys(this.messages);

	// Load rules
	this.rules = loadRules();
	this.cache = new Map();
}
function Validator ( opts ) { this . opts = { messages : deepExtend ( { } , defaultMessages ) } ; if ( opts ) deepExtend ( this . opts , opts ) ; this . messages = this . opts . messages ; this . messageKeys = Object . keys ( this . messages ) ; // Load rules this . rules = loadRules ( ) ; this . cache = new Map ( ) ; }
Validator class constructor

@param {Object} opts
Validator class constructor