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.
| Comment | File | Size | Author |
|---|---|---|---|
| minwords1.patch | 952 bytes | robloach |
Comments
Comment #1
sunComment #2
dries commentedCommitted to CVS HEAD. Updating version for Gabor.
Comment #3
gábor hojtsyCommitted 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.
Comment #4
sunFor 7.x, the node body will hopefully become a configurable (Field API) field anyway.