Вы можете попробовать так:
[System.ComponentModel.DataAnnotations.CustomValidation(typeof(Test), "Verify", ErrorMessage = "No match!")]
public class Test
{
[Required]
public string Password { get; set; }
[Required]
public string ConfirmPassword { get; set; }
public static ValidationResult Verify(Test t)
{
if (t.Password == t.ConfirmPassword)
return ValidationResult.Success;
else
return new ValidationResult("");
}
}