public function setValidator(Validator $validator)
    {
        $this->validator = $validator;
        
        $validator->configureRule($this);
        
        return $this;
    }
public function setValidator(Validator $validator)
    {
        $this->validator = $validator;
        
        $validator->configureRule($this);
        
        return $this;
    }
public function setValidator ( Validator $ validator ) { $ this -> validator = $ validator ; $ validator -> configureRule ( $ this ) ; return $ this ; }
Defines the value of the validator attribute.

@param Validator $validator

@return $this
Defines the value of the validator attribute .