diff --git a/src/utils/validation/validation-rules.jsx b/src/utils/validation/validation-rules.jsx index bbd8bb145..ba0a37ceb 100644 --- a/src/utils/validation/validation-rules.jsx +++ b/src/utils/validation/validation-rules.jsx @@ -47,10 +47,11 @@ const { COLLECTED_VARIABLES, } = TABS_PATHS; +//Disabled validation rules for series to implement specific validation rules for series export const questionnaireRules = { - serie: [requiredSelect], - operation: [requiredSelect], - campaigns: [required], + serie: [], + operation: [], + campaigns: [], name: [required, name], label: [required], TargetMode: [required], diff --git a/src/widgets/questionnaire-new-edit/components/questionnaire-new-edit.jsx b/src/widgets/questionnaire-new-edit/components/questionnaire-new-edit.jsx index 8286ba566..8c2441b9a 100644 --- a/src/widgets/questionnaire-new-edit/components/questionnaire-new-edit.jsx +++ b/src/widgets/questionnaire-new-edit/components/questionnaire-new-edit.jsx @@ -57,6 +57,7 @@ function QuestionnaireNewEdit({ component={ListCheckboxes} label={Dictionary.collectionMode} inline + required > {TargetMode.map((s) => ( @@ -69,6 +70,7 @@ function QuestionnaireNewEdit({ component={ListRadios} label={Dictionary.dynamiqueSpecified} inline + required > {Dictionary.QGoTo} @@ -82,6 +84,7 @@ function QuestionnaireNewEdit({ component={ListRadios} label={Dictionary.formulaSpecified} inline + required > {Dictionary.formulaXpath} diff --git a/src/widgets/statistical-context-criteria/containers/statistical-context-criteria.jsx b/src/widgets/statistical-context-criteria/containers/statistical-context-criteria.jsx index 5628b7e8a..291f6f5cf 100644 --- a/src/widgets/statistical-context-criteria/containers/statistical-context-criteria.jsx +++ b/src/widgets/statistical-context-criteria/containers/statistical-context-criteria.jsx @@ -86,6 +86,7 @@ export const mapStateToProps = ( ...storeToArray(state?.metadataByType?.series), ] : storeToArray(state?.metadataByType?.series), + required: Object.keys(state?.metadataByType?.series ?? {}).length > 0, selectedSerie, path, };