Im 4.satıra hata alıyorum
Ayrıştırma hatası: C sözdizimi hatası, beklenmedik T_FUNCTION: hat 21 \ xampp \ htdocs \ iş \ CASC \ admin \ formu-validator.php
herkes yardımcı olabilir?
public function email($message='')
{
$message = ( empty ($message) ) ? '%s is an invalid email address.' : $message;
$this->set_rule(__FUNCTION__, function($email) {
return ( filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE ) ? FALSE : TRUE;
}, $message);
return $this;
}
private function set_rule($rule, $function, $message='')
{
// do not attempt to validate when no post data is present
if ( $this->haspostdata ) {
if ( ! array_key_exists($rule, $this->rules) ) {
$this->rules[$rule] = TRUE;
if ( ! array_key_exists($rule, $this->functions) && is_callable($function) ) {
$this->functions[$rule] = $function;
}
if ( !empty ($message) ) {
$this->messages[$rule] = $message;
}
}
}
}