added full specification for the function validatePuzzle.