function CVString_checkValidity()
{
	var len = this.value.length;
	var msg = " characters long";
	if (this.minLength == 1)
	{
		msg = " character long";
	}
	
	if (len < this.minLength)
	{
		CValidateBase_invalid(this, "String less than\n" + this.minLength + msg);
	}
}

function CVString(el)
{
	if (el.autoSelect==null)
	{
		el.autoSelect=true;
	}

	CValidateBase(el);

	if (Number(el.minLength) > Number(el.maxLength))
	{
		alert("minLength > maxLength!: " + el.id);
		return;
	}

	el.checkValidity = CVString_checkValidity;
	el.numeric=false;
	el.noenter=false;
	
	// This can't be done automatically by the base class
	// ...Shame...
	el.checkValidity();
}

bindings.vstring = new CBinding(CVString);
