In this Yii extension (decimali18nbehavior), the 'unformatting' is done in the beforeSave() function of a model (more specifically, in the beforeSave() function of a behavior, that can be attached to any model).
This is not a good place, because the validating happens before the saving; and since the price is not a valid numerical value at that point, the validation will fail.