Added unit tests for validators

See #537 for old PR details. Summary: This commit adds testing for all of the validators, as mentioned in #533.