public function checkCode($code){
if(!$code == 1){
$this->AddError("Zleta");
}
}
I am testing with a fixed string, but I would easy add the logic for CODE. The behavior I want is a check of code. The problem is that I must connect to another site with sockets, and there I will make the check. This is the validation after all. That's why I need a function to handle a request of code from user and to check in the system of the other site whether this code exists there.