public function valid()
    {
        $bResult = false;
        if ($this->getOption('required') == 'true') {
            $value = $this->getValue();
            if (empty($value)) {
                $this->isValid = false;
            } else {
                $bResult = true;
            }
        } else {
            $bResult = true;
        }

        return $bResult;
    }
public function valid()
    {
        $bResult = false;
        if ($this->getOption('required') == 'true') {
            $value = $this->getValue();
            if (empty($value)) {
                $this->isValid = false;
            } else {
                $bResult = true;
            }
        } else {
            $bResult = true;
        }

        return $bResult;
    }
public function valid ( ) { $ bResult = false ; if ( $ this -> getOption ( 'required' ) == 'true' ) { $ value = $ this -> getValue ( ) ; if ( empty ( $ value ) ) { $ this -> isValid = false ; } else { $ bResult = true ; } } else { $ bResult = true ; } return $ bResult ; }
Check validator with field.

@return bool
Check validator with field .