// LettersOnlyCondition.class.js (Fertile Form JS Framework) || Version: 0.01 || Last Updated: 2010-08-26 17:00 || Updated by: Hidde-Finne Peters || Created: 2010-08-23 by Hidde-Finne Peters
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

var LettersOnlyCondition = FormCondition.extend({

	init: function (feedbackString, fieldObject) {
		this._super(feedbackString, fieldObject);
	},
	
	//	------------------------------------------------------------------------------------------------------------
	//	--- update -------------------------------------------------------------------------------------------------	0.00
	//	------------------------------------------------------------------------------------------------------------
	//	Methods called to change properties dynamically
	
	//	Reanalyze situation and set property "this.valid" accordingly
	updateValid: function () {
		if (!this.getValue().match(/[^A-Za-z]/)) {
			this.setValid(true);
			return;
		}
		this._super();
	}
	
	//	------------------------------------------------------------------------------------------------------------
	//	------------------------------------------------------------------------------------------------- update ---
	//	------------------------------------------------------------------------------------------------------------
	
});
