Przeglądaj źródła

:pencil2: A bit of cleaning up before merge

tabs-content
tomit4 3 lat temu
rodzic
commit
dbd7fcb326

+ 11
- 10
frontend/src/entities/survey/survey.answer.validator.js Wyświetl plik

@@ -7,16 +7,17 @@ const answerValidator = {
7 7
         minDomainSegments: 2,
8 8
         tlds: { allow: domains },
9 9
     }),
10
-    // TODO: password validation is a moving target with regex,
11
-    // consider using a more robust library?
12
-    password: Joi.string()
13
-        .min(14)
14
-        .max(30)
15
-        .pattern(
16
-            new RegExp(
17
-                '^(?=.*[!@#$%^&*()_+\\-=[\\]{};\':"\\\\|,.<>\\/?])(?=.*[!@#$%^&*()_+\\-=[\\]{};\':"\\\\|,.<>\\/?])[a-zA-Z0-9!@#$%^&*()_+\\-=[\\]{};\':"\\\\|,.<>\\/?]{14,}$',
18
-            ),
19
-        ),
10
+    // Comment out and uncomment below for more robust password testing
11
+    password: Joi.string().min(14).max(30),
12
+    // TODO: consider using a more robust library for password validation
13
+    // password: Joi.string()
14
+        // .min(14)
15
+        // .max(30)
16
+        // .pattern(
17
+            // new RegExp(
18
+                // '^(?=.*[!@#$%^&*()_+\\-=[\\]{};\':"\\\\|,.<>\\/?])(?=.*[!@#$%^&*()_+\\-=[\\]{};\':"\\\\|,.<>\\/?])[a-zA-Z0-9!@#$%^&*()_+\\-=[\\]{};\':"\\\\|,.<>\\/?]{14,}$',
19
+            // ),
20
+        // ),
20 21
     // TODO: Change if going international (only works in usa)
21 22
     zipcode: Joi.string().min(5).max(5).pattern(new RegExp('^[0-9]{5}$')),
22 23
     seeking: Joi.string(),

+ 0
- 2
frontend/src/utils/survey.js Wyświetl plik

@@ -7,9 +7,7 @@ class SurveyFactory {
7 7
         this.questionsFromDb = []
8 8
     }
9 9
     _addResponses(responseKeys, possibleResponsesByCategory) {
10
-        console.log('possibleResponsesByCategory >>', possibleResponsesByCategory)
11 10
         Object.keys(possibleResponsesByCategory).forEach(categoryKey => {
12
-            console.log('categoryKey >>', categoryKey)
13 11
             responseKeys.forEach(responseKey => {
14 12
                 if (possibleResponsesByCategory[categoryKey].length) {
15 13
                     responseKey.responses = possibleResponsesByCategory[categoryKey]

Ładowanie…
Anuluj
Zapisz