Remove dot and dash and save only numbers

Guys, we know that the Firebase Database does not accept dots and dash as the primary key, but is there a way to add dots and dashes to the textbox and then remove them when saving in Firebase? Do you have any examples?

2 posts were merged into an existing topic: Save special characters in firebase