Files
ukraine-timemap/src/reducers/schema/eventSchema.js
Lachlan Kermode 7b44dc8751 allow movements
2019-01-07 07:49:03 +00:00

23 lines
854 B
JavaScript

import Joi from 'joi';
const eventSchema = Joi.object().keys({
id: Joi.string().required(),
description: Joi.string().allow('').required(),
date: Joi.string().required(),
time: Joi.string().required(),
time_precision: Joi.string().allow(''),
location: Joi.string().allow('').required(),
latitude: Joi.string().allow('').required(),
longitude: Joi.string().allow('').required(),
type: Joi.string().allow(''),
category: Joi.string().required(),
narratives: Joi.array(),
narrative___movements: Joi.array(),
sources: Joi.array(),
tags: Joi.string().allow(''),
comments: Joi.string().allow(''),
timestamp: Joi.string().required(),
});
export default eventSchema;