def update_value_entry_validation():
            """Update validation command of string entry."""
            value = validation_command_option_menu.get()

            try:
                value_entry.validation_command = value

            except Exception as err:

                ### set option menu value to None
                validation_command_option_menu.set(None)

                ### communicate the problem to the user

                msg = (
                    "The validation could not be set because"
                    " the value doesn't comply."
                )

                logger.exception(msg)
                USER_LOGGER.exception(msg)

                preview = ' '.join(str(err).splitlines())[:200] # 200 chars

                dialog_msg = msg + (
                    " Check the user log for more details (on the"
                    " graph/canvas, press <Ctrl+Shift+j> or access the"
                    " \"Help > Show user log\" option on the menubar)."
                    f" Here's a preview of the error message: {preview}"
                )

                create_and_show_dialog(dialog_msg, level_name='error')
Update validation command of string entry.
nodezator/editing/widgetpicker/subforms.py