validation of period number and type