/** * Defined by \Zend_Validate_Interface * * Returns true if and only if $value matches against the pattern option * * @param string $value * @return boolean */ public function isValid($value) { // Remove leading disk letter and colon if (preg_match('/^[a-zA-Z]:/', $value)) { $value = substr($value, 2); } return parent::isValid($value); }
/** * Sets validator options * * @param string|\Zend_Config $pattern * @return void */ public function __construct($pattern = self::SCRIPT_REGEX) { parent::__construct($pattern); }