Your passport can be valid for any period.
A visa can be issued even if your passport expires in less than five years. However, please note: visas cannot be “transferred” to a new passport.
If your passport expires before your visa, you’ll need to apply for a new visa with the new passport.