Hello,

I was wondering if it is somehow possible to have a custom error message for each field. For example, for a field 'first name' it would say 'please enter your first name' and for a field 'location' it would say 'please enter your complete address' etc.

Thank you for your support

Comments

stijndm’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

I'll have a look into this for the 2.x branch

feuillet’s picture

Subscribe

stijndm’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Active » Postponed

Moving this as a possible feature for the D7 branch.

stijndm’s picture

Category: support » feature
Priority: Normal » Minor
stijndm’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
ram4nd’s picture

Component: Miscellaneous » Code
Priority: Minor » Normal
Issue summary: View changes
Status: Postponed » Needs work
kenorb’s picture

Status: Needs work » Active

No patch to work on, setting to Active.

dineshw’s picture

Yes,
You should try Webform Validation module along with IFE.
Webform validation module allows you to set validation rules by selecting fields. While setting fields you can set custom error message.
Webform validation also allows few hooks like:
hook_webform_validator_alter(&$validators).
hook_webform_validation_validators().
hook_webform_validation_validate().
hook_webform_validation($type, $op, $data)

Try visiting Adding custom validation rules - Webform Validation hooks
IFE is module used to show submission errors inline with the form elements.

I hope that helps you.

kenorb’s picture

There is also: String Overrides module or Field validation where you can specify a validation rule per field with 'Custom error message'.

kenorb’s picture

Status: Active » Closed (works as designed)

Closing as this feature is already provided in modules mentioned above, and this module is rather for moving the messages only as far as I understand.