Nice, but I'm not quite sure whether this implementation helps me.
Guess this new "Expiration Timeframe" is a system setting that's been added to all invites' "sent" timestamp at registration time since I cannot find a new column in the jom_comprofiler_plugin_invites table that would hold an individually calculated expiration date.
My use case requires an absolute expiration date: All sent invites are valid till an event the user has been invited to starts. So, the closer to an event's startdate the invite has been sent, the shorter the remaining expiry timeframe. With a system wide "Expiration Timeframe" of 1 DAY, say, an invite would get invalidated too late if an user has been invited hours before the event kicks off.
The "Event_Startdate" varies across different events users can get invited to in parallel. For my solution I have AAed the calculation of the expiry date, stored it in a private table and would like to validate against it at registration time.
If an "invite code" typed field does not allow for a custom query validation (why not?) I see two more options:
1) Add an "absolute expiry date" field to the jom_comprofiler_plugin_invites table that gets validated by default if set and can get updated by an AA.
2) Allow for a more sophisticated php coded "Expiration Timeframe". Most likely the validation rule is "now() > sent + Expiration Timeframe". If one could substitute "Expiration Timeframe" with "Event_Startdate - sent" the rule would validate as needed. However, this would bring this validation very close to a standard query / code validation, which I would prefer.