// to > from
 if (strtotime($_POST['to_date']) < strtotime($_POST['from_date'])) {
     throw new fValidationException('Removal date must come after arrival date.');
 }
 // to < max
 if (strtotime($_POST['to_date']) > strtotime("+{$maxStorageMonths} months", strtotime($_POST['from_date']))) {
     throw new fValidationException('Removal date must be 6 months after arrival.');
 }
 $project->setName(filter_var($_POST['name'], FILTER_SANITIZE_STRING));
 $project->setDescription(filter_var($_POST['description'], FILTER_SANITIZE_STRING));
 if ($_POST['contact'] && $_POST['contact'] != '') {
     $project->setContact(filter_var($_POST['contact'], FILTER_SANITIZE_EMAIL));
 } else {
     $project->setContact(null);
 }
 $project->setLocationId(filter_var($_POST['location_id'], FILTER_SANITIZE_STRING));
 $project->setLocation(filter_var($_POST['location'], FILTER_SANITIZE_STRING));
 $project->setFromDate(filter_var($_POST['from_date'], FILTER_SANITIZE_STRING));
 $project->setToDate(filter_var($_POST['to_date'], FILTER_SANITIZE_STRING));
 if (!$project->getId()) {
     $auto = true;
     $logDetails = "Request created";
     $project->setState('Pending Approval');
     $initial = true;
 } else {
     $auto = false;
     $logDetails = "Request updated";
     $initial = false;
 }
 $project->setUpdatedDate(date('Y-m-d'));
 $project->setUserId($user->getId());