State is now assigned after the validation

Reason: ActiveRecord automatically saves records with has_one type association. The validation is now performed on the state_name field and after it passes we assign the state.