Fixed bug with profile_name validation caused by incorrect regular expression in app/models/user.rb. Modified 'a user should have a profile name without spaces' test and added 'a user can have a correctly formatted profile name' test in test/models/user_test.rb.