Personal Message Field Validation Does not Respect #required

populist - April 16, 2008 - 18:59
Project:Forward
Version:5.x-1.12
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The personal message field of the forward form is set to #required = 1 in the form definition. However, in the forward_form_validate there is an additional validation check ala: if (!$form['message']) { form_set_error('message', t('You must enter a message.')); }. This prevents a hook_form_alter from setting the #required bit to 0 because the secondary check will still make the field required. This patch just removes the secondary check. The only downside here is that the error message is not as nice as before ("You must enter a message" versus "Your Personal Message field is required.").

AttachmentSize
forward_message_require.patch343 bytes

#1

seanr - July 6, 2009 - 21:46
Status:needs review» fixed

Fixed in CVS DRUPAL-5, will be in the next release.

#2

System Message - July 20, 2009 - 21:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.