remove unused variable $validate

$validate was unused. And the if was not a condition == but an assignment =

Note: probably, previous pull #11 will cause this pull to merge with conflicts because it touches just the lines before the pull #11. Anyway this one is not important, because the code works. Is just that I consider doing assignments inside an IF is weird but I know why you did it. Maybe for you is okay to leave as it is so feel free to close this pull.