See the answer by Stefan
in a similar thread on stackoverflow.com [ https://stackoverflow.com/a/12824748/2112489 ] that states in relevant part:
My guess is that you want to prevent the user from hitting RET with an
empty answer. Indeed `completing-read' does not prevent that, even
with `require-match' set. The way this is usually handled is by using
a non-nil value for the `default' argument, in which case this value
is returned when the user just hits RET.
If that's not good enough, then you're probably going to have to use
`minibiffer-with-setup-hook' and in the hook, setup a special keymap
you've created for this purpose where RET is bound to a new function
that signals an error if the minibuffer is empty and calls
`minibuffer-complete-and-exit' otherwise.
Another option is to use a while
loop:
(let ((client (catch 'break
(while t
(let* ((completion-ignore-case t)
(choice (completing-read "CLIENT: " '("a" "b" "c" "d") nil t)))
(if (equal choice "")
(message "Please select a valid choice!")
(throw 'break choice)))))))
client)