Page flow design with Close Button

Page flow design with Close Button

For the page flow design I want to place a close button into a UI page of my web application , but once the button is clicked, the input fields validation are throw and the interface is not closed. How can I close the interface without fill the input fields?