validation for the edit text + stability improved

The user can enter only numbers in the "amount field". The user input is
never lost for both the "amount field" and the "years field"