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
Comment #1
stijndm commentedI'll have a look into this for the 2.x branch
Comment #2
feuillet commentedSubscribe
Comment #3
stijndm commentedMoving this as a possible feature for the D7 branch.
Comment #4
stijndm commentedComment #5
stijndm commentedComment #6
ram4nd commentedComment #7
kenorb commentedNo patch to work on, setting to Active.
Comment #8
dineshw commentedYes,
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.
Comment #9
kenorb commentedThere is also: String Overrides module or Field validation where you can specify a validation rule per field with 'Custom error message'.
Comment #10
kenorb commentedClosing 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.