From 05a690f40847ca774721373af2261071dc5d651d Mon Sep 17 00:00:00 2001 From: "Michael.Taylor" Date: Wed, 12 Jan 2022 10:25:20 -0500 Subject: [PATCH] feat: fix optional validations in units --- src/validations/units.validations.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/validations/units.validations.js b/src/validations/units.validations.js index 3979e889..13dc8224 100644 --- a/src/validations/units.validations.js +++ b/src/validations/units.validations.js @@ -3,7 +3,7 @@ import { transformSerialNumberBlock } from '../utils/helpers'; const unitsBaseSchema = { countryJuridictionOfOwner: Joi.string().required(), - inCountryJuridictionOfOwner: Joi.string().required(), + inCountryJuridictionOfOwner: Joi.string().optional(), // must be in the form ABC123-XYZ456 serialNumberBlock: Joi.string() .regex(/[.*\D]+[0-9]+[-][.*\D]+[0-9]+$/) @@ -26,10 +26,10 @@ const unitsBaseSchema = { unitStatus: Joi.string().valid('Held', 'For Sale', 'Retired').required(), unitTransactionType: Joi.string().optional(), unitStatusReason: Joi.string().optional(), - tokenIssuanceHash: Joi.string().required(), + tokenIssuanceHash: Joi.string().optional(), marketplaceIdentifier: Joi.string().optional(), - unitsIssuanceLocation: Joi.string().optional(), - unitRegistryLink: Joi.string().optional(), + unitsIssuanceLocation: Joi.string().required(), + unitRegistryLink: Joi.string().required(), unitMarketplaceLink: Joi.string().optional(), correspondingAdjustmentDeclaration: Joi.string() .valid('Commited', 'Not Required', 'Unknown')