The validator framework and the default set of rules provide a 95% solution. This type of validation falls into the 5% that is not covered. You could either develop a custom validation rule or just implement the validation in your form's validate method.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com