Adding validation to creating period form