[IMP] Added the control on document validity