Updated PetValidator

I have added detailed comments for the validate method