protected function callValidator($validator)
    {
        if (is_callable($validator)) {
            try {
                call_user_func_array($validator, array($this->value));
            } catch (\Exception $ex) {
                $this->error = $ex->getMessage();
                return false;
            }
        }
    }
protected function callValidator($validator)
    {
        if (is_callable($validator)) {
            try {
                call_user_func_array($validator, array($this->value));
            } catch (\Exception $ex) {
                $this->error = $ex->getMessage();
                return false;
            }
        }
    }
protected function callValidator ( $ validator ) { if ( is_callable ( $ validator ) ) { try { call_user_func_array ( $ validator , array ( $ this -> value ) ) ; } catch ( \ Exception $ ex ) { $ this -> error = $ ex -> getMessage ( ) ; return false ; } } }
Call the custom validator

@param $validator
@return bool
Call the custom validator