Hello!

If you import an invalid US phone number via feeds, it will get stored in the database as the string "() -". This is because the phone number is formatted via format_ca_phone_number() before being stored. However, that function assumes the phone number is valid (because in the UI it'd be checked by valid_ca_phone_number()) so it doesn't check if there are any parts missing.

I propose that the feeds support first check if the phone number is valid and not insert a value if the phone number is invalid.

I'll write a patch that does this and attach it in a moment.

Thanks!
David.

CommentFileSizeAuthor
#1 phone-feeds-validation-2029047.patch1.08 KBdsnopek
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek’s picture

Status: Active » Needs review
FileSize
1.08 KB

Patch attached. Please let me know what you think!