ets-labs/python-domain-models

As a developer I want to mark fields as required

Closed this issue · 0 comments

Possible syntax:

class SomeModel(model.DomainModel):

    some_fields = fields.Field(required=True)

It means that:

  1. When model is created, I do have to provide all required fields via keyword arguments, otherwise I will get appropriate error
  2. After model has been created, I can't set required fields to None, but I can set them to field's valid value