It sounds like you're attempting to attach a Validator to a container element. That doesn't work. Validators can only be applied to individual control elements.
I wrote one of these sorts of validators. It was for the traditional "enter-the-password-twice" control pair. What I had to do was attach it to one of the password controls, which then supplied its value to the validator. For the matching value in the other control, I (the validator) had to retrieve that control from the view tree, get its value, compare to the value passed in and then throw the ValidationException if they didn't match.
An IDE is no substitute for an Intelligent Developer.