DRY refactor of beforeSave and beforeValidate callbacks