示例#1
0
文件: Name.php 项目: addiks/phpsql
 protected function validate($value)
 {
     parent::validate($value);
     if (!preg_match("/[a-zA-Z0-9\\-]/is", $value)) {
         throw new Exception\InvalidValue("A name can only contain letters, numbers and the characters '-' and '_'!");
     }
 }