/************************************************************
 * Author: Jeremiah Weaver									*
 * Date: 23-MAR-2004										*
 * Class: Validator (Validator.class.js)					*
 * Language: JavaScript 									*
 * Version: 1.0.0											*
 * Dependencies: NONE										*
 * Special: NONE											*
 ************************************************************
 * CHANGE LOG												*
 ************************************************************
 * 23-MAR-2004 - initial writting							*
 ************************************************************/
 
var JW_GENERAL_VALIDATION_ERROR = 1;
var JW_REQUIRED_VALUE_ERROR = 2;

/*******************
 * ::CONSTRUCTOR:: *
 *******************/
 
 	function Validator () {
 	
 		this.init();
 	}
 	
/************************
 * ::CLASS PROPERTIES:: *
 ************************/
 
 	Validator.prototype._required;
 	Validator.prototype._error;
 
/**********************
 * ::INITIALIZATION:: *
 **********************/
 
 	Validator.prototype.init = function () {
 	
 		this.setRequired(false);
 	};
 	
/**********************
 * ::STATIC METHODS:: *
 **********************/
 
/**********************
 * ::PUBLIC METHODS:: *
 **********************/
 
 	Validator.prototype.execute = function (value) { alert('execute method of Validator sub-class must be implemented'); };
 
 	Validator.prototype.getError = function () { return this._error; };
 	
 	Validator.prototype.setError = function (error) { this._error = error; };
 	
 	Validator.prototype.isRequired = function () { return this.getRequired(); };
 	
 	Validator.prototype.getRequired = function () { return this._required; };
 	
 	Validator.prototype.setRequired = function (flag) { this._required = Boolean(flag); };

/*************************
 * ::PROTECTED METHODS:: *
 *************************/
 
 	Validator.prototype.validateRequired = function (value) {
 	
 		if(undefined == value || 0 == value.length) return false;
 		
 		return true;
 	};

/***********************
 * ::PRIVATE METHODS:: *
 ***********************/
  
/**********************
 * ::EVENT HANDLERS:: *
 **********************/