How should I change the value of the field before saving it to database