function validateObject($value) {
		if ($value === null && $this->minLength > 0)
			return $this->errorTooShort.$this->minLength;
		if ($value === null) return null;

		if (Gen::is_ofType($value, $this->type)) {
			if (method_exists($value, 'validate'))
				return $value->validate($value, $this); //static method
			else
				return $this->validateString(Gen::labelFromObject($value));
			}
		//class should be a subclass of the specified type
		//interfaces are not (yet) supported
		return $this->errorNotOfType. $this->type;
	}
}
?>