Using Validation Groups When Certain Buttons Are Clicked

I am trying to use validation groups to apply a validation only when certain buttons are clicked. I grabbed an example on forum that demonstrated having a field be required only when one of two buttons are clicked. I added validation to the same component, but the validation is displayed regardless of which button is clicked. Is there any way to make this work? See attached sample code.

validationGroupExample.txt

OriginalPostID-227120

OriginalPostID-227120

  Discussion posts and replies are publicly visible