From 9f766b72d720f5b4e8f63794170364ecbb8ea5d2 Mon Sep 17 00:00:00 2001
From: Joni Laukka <joni.laukka.overflow@gmail.com>
Date: Thu, 18 Jul 2019 13:41:05 +0300
Subject: [PATCH] task char limits

---
 src/components/TaskList.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/components/TaskList.js b/src/components/TaskList.js
index ce08afc..241caa4 100644
--- a/src/components/TaskList.js
+++ b/src/components/TaskList.js
@@ -6,8 +6,8 @@ class TaskList extends React.Component {
   constructor(props) {
     super(props);
     this.state = {
-      taskNameInput: "", // >= 3
-      taskDescriptionInput: "", // no limits
+      taskNameInput: "", // 3-31 chars
+      taskDescriptionInput: "", // 0-255
       tasks: [],
       factionlist: [],
       selectedFactionId: ""
@@ -232,6 +232,7 @@ class TaskList extends React.Component {
               type="text"
               placeholder="Task name"
               minLength="3"
+              maxLength="31"
               value={this.state.taskNameInput}
               onChange={e => this.setState({ taskNameInput: e.target.value })}
             />
@@ -239,6 +240,7 @@ class TaskList extends React.Component {
               id="taskDescriptionInput"
               placeholder="Task description"
               value={this.state.taskDescriptionInput}
+              maxLength="255"
               onChange={e =>
                 this.setState({ taskDescriptionInput: e.target.value })
               }
-- 
GitLab