Two settings need to be adjusted for this. One on the cash register, and one in the Admin.
POS
Go to Settings → POS layout and select ‘Edit’ for the layout that contains the product for which the validity must be changed. Select the product and check 'Add validity'.
Admin
Go to Settings → Tickets → Price types and select the product in question. On the right side of the screen are the advanced settings. Check 'Validity change allowed' here. Click ‘Save’.

This function will now allow you to enter a custom validity when selling this article.