From e377f4cd4c99972992206deba9d6d97052eb7f2b Mon Sep 17 00:00:00 2001 From: Pierre Vasseur Date: Mon, 12 Feb 2024 16:53:16 +0100 Subject: [PATCH] cleaner --- .../js/applications/operations/series/edition/validation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/js/applications/operations/series/edition/validation.js b/app/src/js/applications/operations/series/edition/validation.js index 142906a74..8823e944a 100644 --- a/app/src/js/applications/operations/series/edition/validation.js +++ b/app/src/js/applications/operations/series/edition/validation.js @@ -2,12 +2,12 @@ import D, { D1, D2 } from 'js/i18n'; import { formatValidation } from 'js/utils/validation'; import { z } from 'zod'; -const listOfExtraMandatoryFields = (process.env.REACT_APP_VALIDATION_OPERATION_SERIES_EXTRA_MANDATORY_FIELDS ?? "").split(','); +const listOfExtraMandatoryFields = (process.env.REACT_APP_VALIDATION_OPERATION_SERIES_EXTRA_MANDATORY_FIELDS ?? "").split(',') const fieldToTitleMapping = { typeCode: D1.operationType, accrualPeriodicityCode: D1.dataCollectFrequency -}; +} export const isMandatoryField = fieldName => listOfExtraMandatoryFields.indexOf(fieldName) >= 0;