src/MvcError.php
public function length($val, $lower, $upper, $id, $name = null) {
        if (strlen($val) < $lower) {
            if (is_null($name))
                $name = ucwords($id);
            $this->add($id, "$name must be at least $lower characters.");
            return false;
        }
        elseif (strlen($val) > $upper) {
            if (is_null($name))
                $name = ucwords($id);
            $this->add($id, "$name cannot be more than $upper characters long.");
            return false;
        }

        return true;
    }
public function length($val, $lower, $upper, $id, $name = null) {
        if (strlen($val) < $lower) {
            if (is_null($name))
                $name = ucwords($id);
            $this->add($id, "$name must be at least $lower characters.");
            return false;
        }
        elseif (strlen($val) > $upper) {
            if (is_null($name))
                $name = ucwords($id);
            $this->add($id, "$name cannot be more than $upper characters long.");
            return false;
        }

        return true;
    }
public function length ( $ val , $ lower , $ upper , $ id , $ name = null ) { if ( strlen ( $ val ) < $ lower ) { if ( is_null ( $ name ) ) $ name = ucwords ( $ id ) ; $ this -> add ( $ id , "$name must be at least $lower characters." ) ; return false ; } elseif ( strlen ( $ val ) > $ upper ) { if ( is_null ( $ name ) ) $ name = ucwords ( $ id ) ; $ this -> add ( $ id , "$name cannot be more than $upper characters long." ) ; return false ; } return true ; }
Is a string an appropriate length?
Is a string an appropriate length?