Added some ui validations on button.