add simple validator, tests for validator's equal function