On the A/R tab at Accounting / Setup / Preferences in the Payments section, select the preference Require Reference # for Checks and select Save.
With the Require Reference # for Checks preference turned on and Check selected as the Pay Method, a check number must be entered in the Ref # field on the payment. Saving the payment is stopped if Check is selected as the Pay Method, the Pay Amount is not equal to zero, and a Ref # is not present.
The preference affects payments taken at Accounting / A/R / Payments, the Add a Payment on Account shortcut icon, the Receive Payment(s) on Account roll through payment window for Invoices and Bookings, and Quick Tickets.