Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | phone-feeds-validation-2029047.patch | 1.08 KB | dsnopek |
Comments
Comment #1
dsnopekPatch attached. Please let me know what you think!