Validating model attributes before saving an edited field