Skip to content

Commit 9c4fa15

Browse files
author
Vikas Agarwal
committed
Github issue#1323, Updated description question validation for all projects
— Fixed regression which appeared after adding specific validation error for minLength validation
1 parent 9d819d1 commit 9c4fa15

File tree

8 files changed

+48
-0
lines changed

8 files changed

+48
-0
lines changed

src/config/projectQuestions/app_dev.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ const sections = [
6666
// required is not needed if we specifiy validations
6767
// required: true,
6868
validations: 'isRequired,minLength:160',
69+
// providing default error message to handle isRequired validation
70+
// somehow, it is not picking up error message from validationErrors object
71+
validationError: 'Please provide a description',
6972
validationErrors: {
7073
'isRequired' : 'Please provide a description',
7174
'minLength' : 'Please enter at least 160 characters'
@@ -329,6 +332,9 @@ export const basicSections = [
329332
// required is not needed if we specifiy validations
330333
// required: true,
331334
validations: 'isRequired,minLength:160',
335+
// providing default error message to handle isRequired validation
336+
// somehow, it is not picking up error message from validationErrors object
337+
validationError: 'Please provide a description',
332338
validationErrors: {
333339
'isRequired' : 'Please provide a description',
334340
'minLength' : 'Please enter at least 160 characters'

src/config/projectQuestions/avd.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ const sections = [
8181
fieldName: 'description',
8282
description: 'Brief Description',
8383
validations: 'isRequired,minLength:160',
84+
// providing default error message to handle isRequired validation
85+
// somehow, it is not picking up error message from validationErrors object
86+
validationError: 'Please provide a description',
8487
validationErrors: {
8588
'isRequired' : 'Please provide a description',
8689
'minLength' : 'Please enter at least 160 characters'
@@ -296,6 +299,9 @@ export const basicSections = [
296299
// required is not needed if we specifiy validations
297300
// required: true,
298301
validations: 'isRequired,minLength:160',
302+
// providing default error message to handle isRequired validation
303+
// somehow, it is not picking up error message from validationErrors object
304+
validationError: 'Please provide a description',
299305
validationErrors: {
300306
'isRequired' : 'Please provide a description',
301307
'minLength' : 'Please enter at least 160 characters'

src/config/projectQuestions/generic_chatbot.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ const sections = [
4848
id: 'projectInfo',
4949
fieldName: 'description',
5050
validations: 'isRequired,minLength:160',
51+
// providing default error message to handle isRequired validation
52+
// somehow, it is not picking up error message from validationErrors object
53+
validationError: 'Please provide a description',
5154
validationErrors: {
5255
'isRequired' : 'Please provide a description',
5356
'minLength' : 'Please enter at least 160 characters'
@@ -146,6 +149,9 @@ export const basicSections = [
146149
// required is not needed if we specifiy validations
147150
// required: true,
148151
validations: 'isRequired,minLength:160',
152+
// providing default error message to handle isRequired validation
153+
// somehow, it is not picking up error message from validationErrors object
154+
validationError: 'Please provide a description',
149155
validationErrors: {
150156
'isRequired' : 'Please provide a description',
151157
'minLength' : 'Please enter at least 160 characters'

src/config/projectQuestions/ibm_chatbot.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ const sections = [
4848
id: 'projectInfo',
4949
fieldName: 'description',
5050
validations: 'isRequired,minLength:160',
51+
// providing default error message to handle isRequired validation
52+
// somehow, it is not picking up error message from validationErrors object
53+
validationError: 'Please provide a description',
5154
validationErrors: {
5255
'isRequired' : 'Please provide a description',
5356
'minLength' : 'Please enter at least 160 characters'
@@ -158,6 +161,9 @@ export const basicSections = [
158161
// required is not needed if we specifiy validations
159162
// required: true,
160163
validations: 'isRequired,minLength:160',
164+
// providing default error message to handle isRequired validation
165+
// somehow, it is not picking up error message from validationErrors object
166+
validationError: 'Please provide a description',
161167
validationErrors: {
162168
'isRequired' : 'Please provide a description',
163169
'minLength' : 'Please enter at least 160 characters'

src/config/projectQuestions/mobility_testing.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ const sections = [
8686
// required is not needed if we specifiy validations
8787
// required: true,
8888
validations: 'isRequired,minLength:160',
89+
// providing default error message to handle isRequired validation
90+
// somehow, it is not picking up error message from validationErrors object
91+
validationError: 'Please provide a description',
8992
validationErrors: {
9093
'isRequired' : 'Please provide a description',
9194
'minLength' : 'Please enter at least 160 characters'
@@ -377,6 +380,9 @@ export const basicSections = [
377380
// required is not needed if we specifiy validations
378381
// required: true,
379382
validations: 'isRequired,minLength:160',
383+
// providing default error message to handle isRequired validation
384+
// somehow, it is not picking up error message from validationErrors object
385+
validationError: 'Please provide a description',
380386
validationErrors: {
381387
'isRequired' : 'Please provide a description',
382388
'minLength' : 'Please enter at least 160 characters'

src/config/projectQuestions/real_world_testing.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ const sections = [
8080
// required is not needed if we specifiy validations
8181
// required: true,
8282
validations: 'isRequired,minLength:160',
83+
// providing default error message to handle isRequired validation
84+
// somehow, it is not picking up error message from validationErrors object
85+
validationError: 'Please provide a description',
8386
validationErrors: {
8487
'isRequired' : 'Please provide a description',
8588
'minLength' : 'Please enter at least 160 characters'
@@ -427,6 +430,9 @@ export const basicSections = [
427430
// required is not needed if we specifiy validations
428431
// required: true,
429432
validations: 'isRequired,minLength:160',
433+
// providing default error message to handle isRequired validation
434+
// somehow, it is not picking up error message from validationErrors object
435+
validationError: 'Please provide a description',
430436
validationErrors: {
431437
'isRequired' : 'Please provide a description',
432438
'minLength' : 'Please enter at least 160 characters'

src/config/projectQuestions/visual_design.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ const sections = [
8282
id: 'projectInfo',
8383
fieldName: 'description',
8484
validations: 'isRequired,minLength:160',
85+
// providing default error message to handle isRequired validation
86+
// somehow, it is not picking up error message from validationErrors object
87+
validationError: 'Please provide a description',
8588
validationErrors: {
8689
'isRequired' : 'Please provide a description',
8790
'minLength' : 'Please enter at least 160 characters'
@@ -315,6 +318,9 @@ export const basicSections = [
315318
// required is not needed if we specifiy validations
316319
// required: true,
317320
validations: 'isRequired,minLength:160',
321+
// providing default error message to handle isRequired validation
322+
// somehow, it is not picking up error message from validationErrors object
323+
validationError: 'Please provide a description',
318324
validationErrors: {
319325
'isRequired' : 'Please provide a description',
320326
'minLength' : 'Please enter at least 160 characters'

src/config/projectQuestions/wireframes.v1.0.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ const sections = [
8080
id: 'projectInfo',
8181
fieldName: 'description',
8282
validations: 'isRequired,minLength:160',
83+
// providing default error message to handle isRequired validation
84+
// somehow, it is not picking up error message from validationErrors object
85+
validationError: 'Please provide a description',
8386
validationErrors: {
8487
'isRequired' : 'Please provide a description',
8588
'minLength' : 'Please enter at least 160 characters'
@@ -296,6 +299,9 @@ export const basicSections = [
296299
// required is not needed if we specifiy validations
297300
// required: true,
298301
validations: 'isRequired,minLength:160',
302+
// providing default error message to handle isRequired validation
303+
// somehow, it is not picking up error message from validationErrors object
304+
validationError: 'Please provide a description',
299305
validationErrors: {
300306
'isRequired' : 'Please provide a description',
301307
'minLength' : 'Please enter at least 160 characters'

0 commit comments

Comments
 (0)