Arun ,
1) If that you are working with Odata service , the validation happens against gateway .
sample code :
var oModel = new sap.ui.model.odata.ODataModel("http://domain_name/sap/opu/odata/sap/Z_TM_BANK_SRV",false, "Username", "Password"); //username and password are specified while initializing the model.
2) If its a mock JSON / XML data , please look at the below example and upon validation, navigate to next screen .