# CSV Upload: Validation of date concepts in form2 encounters

**URL:** <https://talk.openmrs.org/t/csv-upload-validation-of-date-concepts-in-form2-encounters/32239>\
**Category:** Bahmni\
**Tags:** import, csv\
**Created:** [February 17, 2021, 11:13am UTC](https://talk.openmrs.org/t/csv-upload-validation-of-date-concepts-in-form2-encounters/32239 "2021-02-17T11:13:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivareddy](https://talk.openmrs.org/letter_avatar/sivareddy/32/5_5575768a8748004e209b776fc1b2916d.png) [@sivareddy](https://talk.openmrs.org/u/sivareddy)\
**Post date:** [February 17, 2021, 11:13am UTC](https://talk.openmrs.org/t/csv-upload-validation-of-date-concepts-in-form2-encounters/32239/1 "2021-02-17T11:13:50Z")

</div>

In Observation Forms, we have default setting of only **allowing current and past dates** for date concepts. For Observation forms we have date concepts like “Next Visit date” or “Estimated date of delivery” where future dates can be entered. **On UI through config we are able to control the permission to allow future dates on any date control.**

When we enter values for date concepts through migration templates then we it accepts future dates for all the date concepts which is risky.

**If a future date is entered due to a human error for a date concept that ideally should not allow a future date then the data would be incorrect for the patient.**

Approach :

- Read date observation property ( **allowFutureDates** ) from form definition (.json)
- validate observation value in CSV based on allowFutureDates property

++ @vmalini @pratibhasagar @rakeshtwhyd @angshuonline @gsluthra
