marshmallow-code / marshmallow

A lightweight library for converting complex objects to and from simple Python datatypes.
https://marshmallow.readthedocs.io/
MIT License
7.05k stars 629 forks source link

Make unrequired field during on serialization #2330

Open rayandu924 opened 4 hours ago

rayandu924 commented 4 hours ago

In the load function, can we add the opposite of the partial argument to make fields required ?

lafrech commented 4 hours ago

No. partial makes all fields not required. There is no equivalent argument to make all or some fields required at load time.

rayandu924 commented 3 hours ago

Could this feature be considered for a future release?