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.
I think, spaces are also saved on postal code input on node save, that's why when used in views filter, typing 85704 won't show any result.
use trim() on node save.
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedThis module doesn't do any processing of input - it just takes what the user enters and saves it. This is pretty standard behavior, so I don't see a bug in what it's doing. However, adding such a trim is a decent feature request, so I'm recategorizing this. In the meantime, you can update your Views filter to use the "Contains" operator instead of the "Is equal to" operator.
Comment #2
rszrama CreditAttribution: rszrama commentedA recent commit just implemented hook_field_presave(), so I've added this trimming to it.
Commit: http://drupalcode.org/project/addressfield.git/commitdiff/8c0e233