Looks perfectly legit.
The only thing is you are kinda abusing case; use Kernel.match?/2 instead:
def valid_date?({_y, _m, _d} = date_tuple) do
match?({:ok, _date}, Date.from_erl(date_tuple))
end
Also, you might put this guard directly into the generator as shown here:
gen all y <- integer(0..99),
m <- integer(1..12),
d <- integer(1..31),
match?({:ok, _date}, Date.from_erl({y, m, d})) do


















