Hello yurekha,
For this you will need a helper field. I typically use a calculated value from a secondary data source, and set it to a custom error message. You'll also want to check "don't run the remaining rues if this condition is met". This will stop your submit actions and display the message. Just make sure to clear the field on the first rule of the button.
Attached is an example form.
Hope that helps!
Bre