public function isValid($value)
    {
        $this->setValue($value);

        $pattern = '/^[a-z0-9_\-]*[a-z0-9]$/i';

        $this->pageNameOk = true;

        if (!preg_match($pattern, $value)) {
            $this->error(self::PAGE_NAME);
            $this->pageNameOk = false;
        }

        return $this->pageNameOk;
    }
public function isValid($value)
    {
        $this->setValue($value);

        $pattern = '/^[a-z0-9_\-]*[a-z0-9]$/i';

        $this->pageNameOk = true;

        if (!preg_match($pattern, $value)) {
            $this->error(self::PAGE_NAME);
            $this->pageNameOk = false;
        }

        return $this->pageNameOk;
    }
public function isValid ( $ value ) { $ this -> setValue ( $ value ) ; $ pattern = '/^[a-z0-9_\-]*[a-z0-9]$/i' ; $ this -> pageNameOk = true ; if ( ! preg_match ( $ pattern , $ value ) ) { $ this -> error ( self :: PAGE_NAME ) ; $ this -> pageNameOk = false ; } return $ this -> pageNameOk ; }
Is the page name valid?

@param mixed $value Value to be checked

@return bool
Is the page name valid?