From 4f78ed43437b12304666e9ff66cfb42eb9c4165e Mon Sep 17 00:00:00 2001 From: tudi2d Date: Mon, 30 Mar 2020 18:14:39 +0200 Subject: [PATCH 1/2] Set character limits for user input fields --- src/components/Tags/TagsSelect.tsx | 2 +- .../Events/Content/EventsCreate/EventsCreate.tsx | 3 ++- src/pages/Howto/Content/Common/Howto.form.tsx | 15 +++++++-------- src/pages/Howto/Content/Common/HowtoStep.form.tsx | 6 ++++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/components/Tags/TagsSelect.tsx b/src/components/Tags/TagsSelect.tsx index 8ff4df06ad..eb52d7d501 100644 --- a/src/components/Tags/TagsSelect.tsx +++ b/src/components/Tags/TagsSelect.tsx @@ -137,5 +137,5 @@ TagsSelect.defaultProps = { value: {}, category: undefined, styleVariant: 'selector', - placeholder: 'Select tags - 4 maximum', + placeholder: 'Select tags (max 4)', } diff --git a/src/pages/Events/Content/EventsCreate/EventsCreate.tsx b/src/pages/Events/Content/EventsCreate/EventsCreate.tsx index ed6c48bb57..920843448e 100644 --- a/src/pages/Events/Content/EventsCreate/EventsCreate.tsx +++ b/src/pages/Events/Content/EventsCreate/EventsCreate.tsx @@ -159,7 +159,8 @@ export class EventsCreate extends React.Component { validate={value => this.validateTitle(value)} validateFields={[]} component={InputField} - placeholder="Title of your event" + maxLength="140" + placeholder="Title of your event (max 140 characters)" /> { : false } component={InputField} - placeholder="Make a chair from... - " + maxLength="50" + placeholder="Make a chair from.. (max 50 characters)" /> - + { options={TIME_OPTIONS} component={SelectField} data-cy="time-select" - placeholder="How much time? *" + placeholder="How much time?" /> @@ -271,7 +269,7 @@ export class HowtoForm extends React.Component { validateFields={[]} component={SelectField} options={DIFFICULTY_OPTIONS} - placeholder="How hard is it? *" + placeholder="How hard is it?" /> @@ -290,7 +288,8 @@ export class HowtoForm extends React.Component { flex: 1, minHeight: '150px', }} - placeholder="Introduction to your How-To, keep it to 100 words please! *" + maxLength="700" + placeholder="Introduction to your How-To (max 700 characters)" />