Fix boolean test in validate method.

If first test failed, we would never know because the old
logic would trudge on with the second test. Instead of
this, return boolean false right away. If boolean is true,
then reset $test scalar to false before trying second test.