Yes, theoretically, if the validation code is valid when purchasing the device, then it can be validated. For example, if the validation code's validity period is from January 1, 2012 to January 1, 2017, and the device was purchased on January 1, 2016, then the device can pass validation, even if it is validated in 2023. However, if the device was purchased on January 1, 2018, it cannot be validated.
Normally, proof of purchase is required to demonstrate that the device was purchased within the validity period of the authorization code.
However, in most cases, they are not carefully verified. They only pass if the device has a valid verification code, and they do not check the purchase date.