How to store international phone numbers in PostgreSQL?
Generally speaking, the presentation layer is where formatting should occur.  If spaces are only useful for presentation to the user, then reformat the phone number in the client app, and remove the spaces prior to storing them, since that will save space in the database.

Some of the questions about how to store phone numbers have been asked and answered here already.  See this and this.