One option would be to make the validator implementation's constructor accept as an argument the second field to compare against. Then, make a new instance of the validator for each field, pointing at the corresponding field that it needs to work with to behave correctly.

Another option would be to just make an anonymous subclass, and as long as the other field is made final (or an instance variable), refer to it within the implementation.