Set field's value.

        :param DomainModel model:
        :param object value:

def set_value(self, model, value):
        """Set field's value.

        :param DomainModel model:
        :param object value:
        """
        if value is None and self.required:
            raise AttributeError("This field is required.")

        if value is not None:
            value = self._converter(value)

        setattr(model, self.storage_name, value)