If I understand your problem correctly, you want to validate the phone number and normalize the entered value when it is actually written to the database, is that correct? If so, you might want to have a look at Ecto.Changeset.prepare_changes/2.
If I understand your problem correctly, you want to validate the phone number and normalize the entered value when it is actually written to the database, is that correct? If so, you might want to have a look at Ecto.Changeset.prepare_changes/2.