I will recommend to the documentation team that we create a step by step tutorial. Have you read the documentation that comes with DFP? It should cover how to get the width and height of an image, and validation toolkit should allow you to validate those values as numbers.
Are you still having trouble identifying how to refer to the width and height? Forget validating them for a second. Can you display the width and height of an uploaded image or store it into your database? Just trying to identify if you are having trouble using validation toolkit, or referencing the width and height numbers.