validating apply for leave