Category Archives: Symfony 1.x

Symfony 1.x – simple directory name validator

/** * validate directory path * example: /path/dir1/dir2 – it is valid * path/dir2/dir2 – it is invalid */ $this->setValidator(‘proxy_folder’, new sfValidatorRegex( array( ‘pattern’ => ‘#^(/[^/]+)+$#’, ‘required’ => false ), array(‘invalid’ => ‘Invalid prefix “Folder name” field must begin /’) … Continue reading

Posted in directory name, Symfony 1.x, validator | Leave a comment