I am trying to validate API Key and Pass Key, so in order to do so i have used 2 buttons, one for testing it, another for saving it. Below you can see how i have done it: