validate save button