public function required($message = null)
    {
        $this->setRule(__FUNCTION__, function($val)
                       {
                           if (is_scalar($val)) {
                               $val = trim($val);
                           }
                           return !empty($val);
                       }, $message);
        return $this;
    }
public function required($message = null)
    {
        $this->setRule(__FUNCTION__, function($val)
                       {
                           if (is_scalar($val)) {
                               $val = trim($val);
                           }
                           return !empty($val);
                       }, $message);
        return $this;
    }
public function required ( $ message = null ) { $ this -> setRule ( __FUNCTION__ , function ( $ val ) { if ( is_scalar ( $ val ) ) { $ val = trim ( $ val ) ; } return ! empty ( $ val ) ; } , $ message ) ; return $ this ; }
Field must be filled in.

@param string $message
@return FormValidator
Field must be filled in .