<?php 
class VLDMaximo extends Zend_Validate_Abstract {
	const NOT_MATCH = 'notMatch';
	private $maximo;
	protected $_messageTemplates = array(
			self::NOT_MATCH => 'Los campos no coinciden'  );
	public function __construct( $maximo, $ErrorMsg ) {
		$this->maximo = $maximo;    
		$this->_messageTemplates[self::NOT_MATCH] = $ErrorMsg;
	}    
	
	public function isValid($value) {
		   
		$this->_setValue($value);    
		if ($value <= $this->maximo) {
			return true;
		} else{
			$this->_error(self::NOT_MATCH);    return false;
			
		}   
	}
}