diff --git a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.js b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.js index 3fc81127..2efeea83 100644 --- a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.js +++ b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.js @@ -65,7 +65,9 @@ const ChooseType = () => { } const validationSchema = Yup.object().shape({ - inputType: Yup.string().required() + inputType: Yup.string() + .label('Input type') + .required() }) const defaultValues = { diff --git a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.js b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.js index 85d0ceef..c7f0de6d 100644 --- a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.js +++ b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.js @@ -32,8 +32,12 @@ const Screen1Information = () => { } const validationSchema = Yup.object().shape({ - screen1Title: Yup.string().required(), - screen1Text: Yup.string().required() + screen1Title: Yup.string() + .label('Screen title') + .required(), + screen1Text: Yup.string() + .label('Screen text') + .required() }) const defaultValues = { diff --git a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.js b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.js index 3b8957b3..0003dd1c 100644 --- a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.js +++ b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.js @@ -30,8 +30,12 @@ const ScreenInformation = () => { } const validationSchema = Yup.object().shape({ - screen2Title: Yup.string().required(), - screen2Text: Yup.string().required() + screen2Title: Yup.string() + .label('Screen title') + .required(), + screen2Text: Yup.string() + .label('Screen text') + .required() }) const defaultValues = { diff --git a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.js b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.js index a55345e8..2516d37e 100644 --- a/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.js +++ b/new-lamassu-admin/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.js @@ -40,28 +40,38 @@ const validationSchema = Yup.lazy(values => { switch (values.inputType) { case 'numerical': return Yup.object({ - constraintType: Yup.string().required(), + constraintType: Yup.string() + .label('Constraint type') + .required(), inputLength: Yup.number().when('constraintType', { is: 'length', then: Yup.number() .min(0) - .required(), + .required('The number of digits is required'), else: Yup.mixed().notRequired() }) }) case 'text': return Yup.object({ - constraintType: Yup.string().required(), - inputLabel1: Yup.string().required(), + constraintType: Yup.string() + .label('Constraint type') + .required(), + inputLabel1: Yup.string() + .label('Text entry label') + .required(), inputLabel2: Yup.string().when('constraintType', { is: 'spaceSeparation', - then: Yup.string().required(), + then: Yup.string() + .label('Second word label') + .required(), else: Yup.mixed().notRequired() }) }) case 'choiceList': return Yup.object({ - constraintType: Yup.string().required(), + constraintType: Yup.string() + .label('Constraint type') + .required(), listChoices: Yup.array().test( 'has-2-or-more', 'Choice list needs to have two or more non empty fields',