Skip to content

Commit

Permalink
refactor: org creation page consent questions (#1185)
Browse files Browse the repository at this point in the history
* fix consentQuestion: participated_in question required change to false

* fix consentDetailsValidation: updated validation where user should mark atleast one checkbox for log_into question
  • Loading branch information
NSUWAL123 authored Feb 9, 2024
1 parent 68b624c commit 5d34fbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function ConsentDetailsValidation(values: IConsentDetailsFormData) {
if (values?.review_documentation?.length < 3) {
errors.review_documentation = 'Please ensure that all checkboxes are marked.';
}
if (values?.log_into?.length < 2) {
errors.log_into = 'Please ensure that all checkboxes are marked.';
if (values?.log_into?.length < 1) {
errors.log_into = 'Please ensure that any one of the checkbox is marked.';
}

return errors;
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/constants/ConsentQuestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const consentQuestions: consentQuestionsType[] = [
{
id: 'participated_in',
type: 'checkbox',
required: true,
required: false,
question: 'Have you participated in...?',
description: 'These are not required but helpful in assessing on-boarding pathways.',
options: [
Expand Down

0 comments on commit 5d34fbd

Please sign in to comment.