diff --git a/CHANGELOG.md b/CHANGELOG.md index 33a9a74..5430142 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.8.0 - 2019-09-16 +Enhancements: +* Add `unique` validation to arrays + ## 1.7.0 - 2019-09-14 Enhancements: * Add method to clone structures diff --git a/dist/structure.js b/dist/structure.js index 82fa32b..f2d3b18 100644 --- a/dist/structure.js +++ b/dist/structure.js @@ -602,7 +602,7 @@ return /******/ (function(modules) { // webpackBootstrap var _require = __webpack_require__(10), mapToJoi = _require.mapToJoi; - var joiMappings = [['minLength', 'min', true], ['maxLength', 'max', true], ['exactLength', 'length', true]]; + var joiMappings = [['minLength', 'min', true], ['maxLength', 'max', true], ['exactLength', 'length', true], ['unique', 'unique']]; module.exports = function arrayValidation(typeDescriptor, itemTypeDescriptor) { var joiSchema = joi.array().items(itemTypeDescriptor.validation); diff --git a/package.json b/package.json index 0e4230e..cd57185 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "structure", - "version": "1.7.0", + "version": "1.8.0", "description": "A simple schema/attributes library built on top of modern JavaScript", "main": "src/index.js", "browser": "dist/structure.js",