'/^[a-z,A-Z,0-9,\_\-\.\/]+$/', // '/^[^:]+$/'
'alias' => '/^[a-z,A-Z,0-9,\_\-\.]+$/',
);
if (key_exists($name, $list)){
return $list[$name];
}else {
return false;
}
}
function validate($string)
{
if (preg_match($this->getRegex($this->name), $string)) {
return true;
}
return false;
}
function getValidationScript($options = null)
{
return array(" var regex = " . $this->getRegex($this->name) . ";\n", "{jsVar} != '' && !regex.test({jsVar})");
}
}
?>