replace tab with 4 spaces
input validation bug fixed