correct mispelling of validate variable
change == into =
correct whitespace removal block
add missing semicolon