Fixed switchInput ignoring validation

SwitchInput should honor the return value of close, otherwise validation occurs but is ignored.
Merge pull request #265 from ags131/patch-1

Fixed switchInput ignoring validation