I can see it's in the error array. Your making this confusing for those trying to help by saying you don't want $_POST['spousename'] to be manditory and then having something like that in your script. Makes it harder to see exactly what your trying to do.
As far as the echo statements, they are for testing.
You have 3 possible scenarios:
1) Valid spouse name is entered.
2) Invalid spouse name is entered.
3) No spouse name is entered.
By using the echos you should be able to see the if/else statements working. Once you are sure they are, you can handle each scenario appropriately.