src/open_vp_cal/widgets/project_settings_widget.py [450:471]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def validate(self) -> str:
        """ Validates the input values for the custom primaries

        Returns: error message if validation fails, empty string otherwise

        """
        values, name = self.get_values()
        grand_total = sum(sum(sublist) for sublist in values)
        if grand_total == 0:
            return "All values cannot be zero"
        if not name:
            return "Name cannot be empty"
        return ""

    def accept(self) -> None:
        """ Accepts the dialogue if the validation passes, otherwise shows a warning message
        """
        invalid = self.validate()
        if not invalid:
            super().accept()
        else:
            QMessageBox.warning(self, "Validation Error", invalid)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/open_vp_cal/widgets/project_settings_widget.py [566:587]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def validate(self) -> str:
        """ Validates the input values for the custom primaries

        Returns: error message if validation fails, empty string otherwise

        """
        values, name = self.get_values()
        grand_total = sum(sum(sublist) for sublist in values)
        if grand_total == 0:
            return "All values cannot be zero"
        if not name:
            return "Name cannot be empty"
        return ""

    def accept(self) -> None:
        """ Accepts the dialogue if the validation passes, otherwise shows a warning message
        """
        invalid = self.validate()
        if not invalid:
            super().accept()
        else:
            QMessageBox.warning(self, "Validation Error", invalid)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



