Hi,
my problem is that if I insert a wrong number (too much short or too much long or with text or symbols) the system reply me with this error message:
Notice: Undefined index: message in field_default_form_errors() (line 412 of ../modules/field/field.form.inc)
Is it possible to have a message understandable for people?
There is a patch for solve this problem ??
I'm an italian user and I use D7.17
Thanks very much
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | phone_undefined_index_message-1841370-2.patch | 651 bytes | jonathan_hunt |
Comments
Comment #1
sophie.spillane commentedI'm getting the same issue, seems like the field module expects the error message to be in $error['message'] instead of $error['error'] which is what the phone module passes (line 159 of phone.module)
Comment #2
jonathan_hunt commentedPer @sophie.spillane's diagnosis, and the docs at http://api.drupal.org/api/drupal/modules%21field%21field.api.php/functio..., phone_field_validate() should be returning both 'error' and 'message' keys.
Comment #3
jonathan_hunt commentedDoh, already fixed with identical patch at http://drupal.org/node/1715380#comment-6496918
Comment #3.0
jonathan_hunt commentedI added the Drupal version used