sob/model.py
def _validate(self, raise_errors: bool = True) -> List[str]:
        """
        This method verifies that all required properties are present, and
        that all property values are of the correct type.
        """
        validation_error_messages: List[str] = []
        validated_object: abc.Object = self
        instance_hooks: Optional[abc.ObjectHooks] = hooks.object_read(self)
        if instance_hooks and instance_hooks.before_validate:
            validated_model: abc.Model = instance_hooks.before_validate(self)
            if TYPE_CHECKING:
                assert isinstance(validated_model, abc.Object)
            validated_object = validated_model
        instance_meta: Optional[abc.ObjectMeta] = meta.object_read(
            validated_object
        )
        if instance_meta and instance_meta.properties:
            property_name_: str
            property_: abc.Property
            error_message: str
            for (
                property_name_,
                property_,
            ) in instance_meta.properties.items():
                for error_message in (
                    validated_object
                )._get_property_validation_error_messages(
                    property_name_,
                    property_,
                    getattr(validated_object, property_name_),
                ):
                    validation_error_messages.append(error_message)
            if instance_hooks and instance_hooks.after_validate:
                instance_hooks.after_validate(validated_object)
            if raise_errors and validation_error_messages:
                raise errors.ValidationError(
                    "\n".join(validation_error_messages)
                )
        return validation_error_messages

        This method verifies that all required properties are present, and
        that all property values are of the correct type.
        
This method verifies that all required properties are present, and
that all property values are of the correct type.
This method verifies that all required properties are present and that all property values are of the correct type .
def _validate(self, raise_errors: bool = True) -> List[str]:
        validation_error_messages: List[str] = []
        validated_object: abc.Object = self
        instance_hooks: Optional[abc.ObjectHooks] = hooks.object_read(self)
        if instance_hooks and instance_hooks.before_validate:
            validated_model: abc.Model = instance_hooks.before_validate(self)
            if TYPE_CHECKING:
                assert isinstance(validated_model, abc.Object)
            validated_object = validated_model
        instance_meta: Optional[abc.ObjectMeta] = meta.object_read(
            validated_object
        )
        if instance_meta and instance_meta.properties:
            property_name_: str
            property_: abc.Property
            error_message: str
            for (
                property_name_,
                property_,
            ) in instance_meta.properties.items():
                for error_message in (
                    validated_object
                )._get_property_validation_error_messages(
                    property_name_,
                    property_,
                    getattr(validated_object, property_name_),
                ):
                    validation_error_messages.append(error_message)
            if instance_hooks and instance_hooks.after_validate:
                instance_hooks.after_validate(validated_object)
            if raise_errors and validation_error_messages:
                raise errors.ValidationError(
                    "\n".join(validation_error_messages)
                )
        return validation_error_messages
def _validate ( self , raise_errors : bool = True ) -> List [ str ] : validation_error_messages : List [ str ] = [ ] validated_object : abc . Object = self instance_hooks : Optional [ abc . ObjectHooks ] = hooks . object_read ( self ) if instance_hooks and instance_hooks . before_validate : validated_model : abc . Model = instance_hooks . before_validate ( self ) if TYPE_CHECKING : assert isinstance ( validated_model , abc . Object ) validated_object = validated_model instance_meta : Optional [ abc . ObjectMeta ] = meta . object_read ( validated_object ) if instance_meta and instance_meta . properties : property_name_ : str property_ : abc . Property error_message : str for ( property_name_ , property_ , ) in instance_meta . properties . items ( ) : for error_message in ( validated_object ) . _get_property_validation_error_messages ( property_name_ , property_ , getattr ( validated_object , property_name_ ) , ) : validation_error_messages . append ( error_message ) if instance_hooks and instance_hooks . after_validate : instance_hooks . after_validate ( validated_object ) if raise_errors and validation_error_messages : raise errors . ValidationError ( "\n" . join ( validation_error_messages ) ) return validation_error_messages
This method verifies that all required properties are present, and
that all property values are of the correct type.
This method verifies that all required properties are present and that all property values are of the correct type .
"""
        This method verifies that all required properties are present, and
        that all property values are of the correct type.
        """
self
raise_errors
bool