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

Comments

sophie.spillane’s picture

I'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)

jonathan_hunt’s picture

Status: Active » Needs review
StatusFileSize
new651 bytes

Per @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.

jonathan_hunt’s picture

Status: Needs review » Closed (duplicate)

Doh, already fixed with identical patch at http://drupal.org/node/1715380#comment-6496918

jonathan_hunt’s picture

Issue summary: View changes

I added the Drupal version used