The number of words feature in the content type form allows you to require a minimum amount of words per content type. One of my clients wanted to make the body required, but not require a minimum number of words. Adding "1" to this field allowed for this use case.

The minimum amount of words was required, but 10 was just too many words. Did that make sense? Anyway, here's the patch.

CommentFileSizeAuthor
minwords1.patch952 bytesrobloach

Comments

sun’s picture

Status: Needs review » Reviewed & tested by the community
dries’s picture

Version: 7.x-dev » 6.x-dev

Committed to CVS HEAD. Updating version for Gabor.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed to Drupal 6, but I am not sure about the usefulness of this.

If there is no body content entered, Drupal will print out an error message that at least one word is required. I think that is misleading, since even though mathematically it tells you you need to enter something, what you'd want to achieve is just make the body required, which you can do via a simple form alter putting #required => TRUE. That would send the right error message to the user.

sun’s picture

For 7.x, the node body will hopefully become a configurable (Field API) field anyway.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.