Fill out the form at admin/build/validation_api/validators/add
Name: pin
Type: Regular Expression
Rule: /^[0-9]{4,4}$/
Message: %field needs to be 4 numeric digits.

but, validation messages shown below text :
field_test1_date[0] needs to be 4 numeric digits

how to display specific field label in validation messages

Comments

perfectcu.be’s picture

Status: Active » Needs review
StatusFileSize
new1.29 KB
new27.61 KB

I know this is an old message, but I encountered also encountered this problem so I thought I would post my solution. Validation API is using the machine name in the error messages, which is very confusing to the average customer or client using your site. This patch will use the human-readable field name instead.