This is the concept which you can work with to build your custom coding:
/includes/modules/pages/checkout_confirmation/header_php.php
around line 44 you have:
Code:
if (isset($_POST['payment'])) $_SESSION['payment'] = $_POST['payment'];
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
Add the check to enforce not-empty content:
Code:
if (isset($_POST['payment'])) $_SESSION['payment'] = $_POST['payment'];
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
if ($_SESSION['comments'] == '') {
$messageStack->add('checkout_payment', 'Please enter order comments before proceeding.', 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}