How to show validation msg on button/icon click?

Certified Associate Developer

How to show validation msg on button/icon click? i want to validate the status from the docusign and on the basis of result want to show validation msg.

  Discussion posts and replies are publicly visible