def METHOD_NAME(self):
    for record in self:
        if (
            record.tbai_enabled
            and record.tbai_device_serial_number
            and 30 < len(record.tbai_device_serial_number)
        ):
            raise exceptions.ValidationError(
                _(
                    "Company %s Device Serial Number longer than expected. "
                    "Should be 30 characters max.!"
                )
                % record.name
            )