lib/validator.js
function postCast(value, parameterDefinition) {
	const type = parameterDefinition.type;
	const format = parameterDefinition.format;
	if (type === 'string' && (format === 'date' || format === 'date-time')) {
		return new Date(value);
	} else {
		return value;
	}
}
function postCast(value, parameterDefinition) {
	const type = parameterDefinition.type;
	const format = parameterDefinition.format;
	if (type === 'string' && (format === 'date' || format === 'date-time')) {
		return new Date(value);
	} else {
		return value;
	}
}
function postCast ( value , parameterDefinition ) { const type = parameterDefinition . type ; const format = parameterDefinition . format ; if ( type === 'string' && ( format === 'date' || format === 'date-time' ) ) { return new Date ( value ) ; } else { return value ; } }
Casts values AFTER validated to support string formats
Casts values AFTER validated to support string formats