Removed condition from validate function, it wasn't needed.
Added another test.