def validator(grid, coord, val):
    """ Validates that an added value is valid relative to the current grid.
    
    Parameters:
        grid (2D numpy): the sudoku grid
        coord (tuple): the cell to be added coordinate
        val(int): value to be validated
    Returns:
        (boolean): True if it is valid """

    row, col = tuple(coord)
    if val in grid[row]:
        return False
    if val in grid[:, col]:
        return False

    r = 3 * (row // 3)
    c = 3 * (col // 3)
    box = grid[r:r+3, c:c+3]
    if val in box:
        return False
        
    return True