public function fail($asString = false)
    {
        if (!$this->_checked) {
            $this->check();
        }

        if (!$asString) {
            return $this->_fail;
        }

        $items = [];
        foreach ($this->_fail as $rule) {
            $items[] = "{$rule}";
        }

        return implode(', ', $items);
    }
public function fail($asString = false)
    {
        if (!$this->_checked) {
            $this->check();
        }

        if (!$asString) {
            return $this->_fail;
        }

        $items = [];
        foreach ($this->_fail as $rule) {
            $items[] = "{$rule}";
        }

        return implode(', ', $items);
    }
public function fail ( $ asString = false ) { if ( ! $ this -> _checked ) { $ this -> check ( ) ; } if ( ! $ asString ) { return $ this -> _fail ; } $ items = [ ] ; foreach ( $ this -> _fail as $ rule ) { $ items [ ] = "{$rule}" ; } return implode ( ', ' , $ items ) ; }
Gets all rules marked as FAIL.

@param bool $asString True will returns a comma separated string of rules
@return array|string
Gets all rules marked as FAIL .