Can you clarify which are the conditions where you want to have the custom message displayed? Is it:
input$x %in% c("A", "B") # then display custom message
OR is it:
!(input$x %in% c("A", "B")) # then display custom message
Or even better, make a small example app that reproduces your problem! See: Shiny debugging and reprex guide