validate ending word length