diff --git a/frontend/src/pages/_dashboard/renderDashboard/organiser/edit/challenges/ChallengesForm.js b/frontend/src/pages/_dashboard/renderDashboard/organiser/edit/challenges/ChallengesForm.js index 62493f2d..e6144328 100644 --- a/frontend/src/pages/_dashboard/renderDashboard/organiser/edit/challenges/ChallengesForm.js +++ b/frontend/src/pages/_dashboard/renderDashboard/organiser/edit/challenges/ChallengesForm.js @@ -203,6 +203,12 @@ export default ({ value, onChange }) => { ) } + const styling = { + challengeNameMaxLength: 200, + challengeSlugMaxLength: 200, + textAreaMaxLength: styling.textAreaMaxLength, + } + const renderForm = () => ( <> @@ -210,7 +216,7 @@ export default ({ value, onChange }) => { label="Challenge name" value={name} onChange={handleNameChange} - maxLength={50} + maxLength={styling.challengeNameMaxLength} /> The unique publicly visible name of the challenge. @@ -221,7 +227,7 @@ export default ({ value, onChange }) => { label="Unique slug" value={slug} onChange={setSlug} - maxLength={50} + maxLength={styling.challengeSlugMaxLength} /> A unique slug for the challenge. This will be used in e.g. @@ -280,7 +286,7 @@ export default ({ value, onChange }) => { value={description} onChange={setDescription} placeholder="Description goes here" - maxLength={1000} + maxLength={styling.textAreaMaxLength} /> Challenge description. @@ -293,7 +299,7 @@ export default ({ value, onChange }) => { value={insights} onChange={setInsights} placeholder="Insights go here" - maxLength={1000} + maxLength={styling.textAreaMaxLength} /> Challenge insights. @@ -304,7 +310,7 @@ export default ({ value, onChange }) => { value={resources} onChange={setResources} placeholder="Resource go here" - maxLength={1000} + maxLength={styling.textAreaMaxLength} /> Challenge resources. @@ -315,7 +321,7 @@ export default ({ value, onChange }) => { value={prizes} onChange={setPrizes} placeholder="Prizes go here" - maxLength={1000} + maxLength={styling.textAreaMaxLength} /> Challenge Prizes. @@ -326,7 +332,7 @@ export default ({ value, onChange }) => { value={criteria} onChange={setCriteria} placeholder="Criteria go here" - maxLength={1000} + maxLength={styling.textAreaMaxLength} /> Challenge criteria. @@ -337,7 +343,7 @@ export default ({ value, onChange }) => { value={companyInfo} onChange={setCompanyInfo} placeholder="Company info goes here" - maxLength={1000} + maxLength={styling.textAreaMaxLength} /> Company Info diff --git a/shared/schemas/Challenge.js b/shared/schemas/Challenge.js index ee6bdd2e..397607fb 100644 --- a/shared/schemas/Challenge.js +++ b/shared/schemas/Challenge.js @@ -11,7 +11,7 @@ const ChallengeSchema = new mongoose.Schema({ name: { type: String, required: true, - length: 50, + length: 200, }, partner: { type: String,