public function check($data = null)
    {
        $validator = $this->getValidator($data);

        if ($validator->isValid()) {
            return $this->suc();
        } else {
            return $this->err($validator->getFirstMessage());
        }
    }
public function check($data = null)
    {
        $validator = $this->getValidator($data);

        if ($validator->isValid()) {
            return $this->suc();
        } else {
            return $this->err($validator->getFirstMessage());
        }
    }
public function check ( $ data = null ) { $ validator = $ this -> getValidator ( $ data ) ; if ( $ validator -> isValid ( ) ) { return $ this -> suc ( ) ; } else { return $ this -> err ( $ validator -> getFirstMessage ( ) ) ; } }
Validate the data and return the ret array

@param mixed $data
@return array
Validate the data and return the ret array