When Minimum number of words validation is set to 1 in order to change the required field message, the validation doesn't work.

CommentFileSizeAuthor
#1 webform_validation-one_word-1921064.patch847 bytesbrunops

Comments

brunops’s picture

StatusFileSize
new847 bytes

Fix the issue by verifying the number of words when it is configured to one and the field value is empty. This way, the normal behavior shouldn't be affected.

liam morland’s picture

I'm not sure that min_words = 1 makes much sense. How is that different from setting the field to be required? I would rather avoid the special case introduced by this patch.

liam morland’s picture

This patch needs a re-roll due to #1943140: Validate min/max words for HTML textareas.

liam morland’s picture

Status: Needs review » Needs work
liam morland’s picture

Status: Needs work » Closed (won't fix)

Set the field to "required" to handle this case.