I want to softly enforce users in a user base to set a value that previously was not required, but now is.
This is the setup
Users fetched from the database are validated against the database bound marshmallow schema, this allows the None value.
country = fields.String(validate=OneOf(COUNTRY_CODES), allow_none=True)
New users are validated against a marshmallow schema that disallows None.
country = fields.String(validate=OneOf(COUNTRY_CODES), allow_none=False)
Edited users are validated against another marshmallow schema, and here is the tricky part.
I want it to be fine to not set the field, if it is previously not set, but once it is set, you should not be able to remove it.
How is this specified in marshmallow?