JavaScript validator for Sudoku puzzle solution