Properly pass the algorithm and client date to the isValid function.