private function validate()
    {
        if (!stristr(self::CHARACTER_LIST, $this->value[0])) {
            throw new \Exception('Invalid first character: ' . $this->value[0]);
        }

        if (!in_array($this->value, self::listForCharacter($this->value[0]))) {
            throw new \Exception('Word not in known list of words: ' . $this->value);
        }
    }
private function validate()
    {
        if (!stristr(self::CHARACTER_LIST, $this->value[0])) {
            throw new \Exception('Invalid first character: ' . $this->value[0]);
        }

        if (!in_array($this->value, self::listForCharacter($this->value[0]))) {
            throw new \Exception('Word not in known list of words: ' . $this->value);
        }
    }
private function validate ( ) { if ( ! stristr ( self :: CHARACTER_LIST , $ this -> value [ 0 ] ) ) { throw new \ Exception ( 'Invalid first character: ' . $ this -> value [ 0 ] ) ; } if ( ! in_array ( $ this -> value , self :: listForCharacter ( $ this -> value [ 0 ] ) ) ) { throw new \ Exception ( 'Word not in known list of words: ' . $ this -> value ) ; } }
Validate word against list of allowed characters and words

@throws \Exception
Validate word against list of allowed characters and words