I was trying to use a numeric rule to validate a form field, but kept getting the following unhelpful message in the browser with invalid entries:

Use only numbers at %field.

It seems that only some types of validation substitute %field with the name of the field, so the attached patch changes behaviour so %field is always substituted with the name of the field, which corrects the above message to;

Use only numbers at Survey ID.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks’s picture

Assigned: Unassigned » Jelle_S
Jelle_S’s picture

Assigned: Jelle_S » Unassigned
Status: Active » Fixed

Fixed in latest dev. Thanks for the patch!

Status: Fixed » Closed (fixed)

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