Remove any non-degit characters when getting value from input.

It's necessary for formatting numbers, adding units, etc.