HOW CAN I APPLY CONDITION TO INSERT DATA IN ORACLE FORMS? : I HAVE TABLE DOC_CUST_PRODUCT(DOC_CODE,CUST_CODE,P_CODE)

SUPPOSE I WANT TO RESTRICT INSERTION AND SHOW MESSAGE WHEN A DOCTOR HAS MORE THAN 5   DIFFERENT CUST_CODE