From bd333d07fa5bb7c266e486690350b1c89785f235 Mon Sep 17 00:00:00 2001 From: shubhu Date: Mon, 13 Mar 2017 01:59:06 +0530 Subject: [PATCH] fixed #737 isRequired validations for specs --- src/config/projectQuestions/avd.v1.0.js | 6 ++++-- src/config/projectQuestions/avd.v1.1.js | 6 ++++-- src/config/projectQuestions/wireframes.v1.0.js | 6 ++++-- src/projects/detail/components/SpecScreenQuestions.jsx | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/config/projectQuestions/avd.v1.0.js b/src/config/projectQuestions/avd.v1.0.js index ee87a8cd9..5dd4ffcd8 100644 --- a/src/config/projectQuestions/avd.v1.0.js +++ b/src/config/projectQuestions/avd.v1.0.js @@ -139,7 +139,8 @@ const sections = [ description: 'Describe your objectives for creating this application', type: 'textinput', fieldName: 'name', - validationError: 'Screen name cannot be blank' + validationError: 'Screen name cannot be blank', + validations: 'isRequired' }, { icon: 'question', @@ -148,7 +149,8 @@ const sections = [ description: 'What are the important features/capabilities that the screen provides to your end users?', type: 'textbox', fieldName: 'description', - validationError: 'Answer cannot be blank' + validationError: 'Answer cannot be blank', + validations: 'isRequired' }, { icon: 'question', diff --git a/src/config/projectQuestions/avd.v1.1.js b/src/config/projectQuestions/avd.v1.1.js index 0205daac2..e7da6b590 100644 --- a/src/config/projectQuestions/avd.v1.1.js +++ b/src/config/projectQuestions/avd.v1.1.js @@ -137,7 +137,8 @@ const sections = [ description: 'Describe your objectives for creating this application', type: 'textinput', fieldName: 'name', - validationError: 'Screen name cannot be blank' + validationError: 'Screen name cannot be blank', + validations: 'isRequired' }, { icon: 'question', @@ -146,7 +147,8 @@ const sections = [ description: 'What are the important features/capabilities that the screen provides to your end users?', type: 'textbox', fieldName: 'description', - validationError: 'Answer cannot be blank' + validationError: 'Answer cannot be blank', + validations: 'isRequired' }, { icon: 'question', diff --git a/src/config/projectQuestions/wireframes.v1.0.js b/src/config/projectQuestions/wireframes.v1.0.js index 4afe083b1..30d470dbb 100644 --- a/src/config/projectQuestions/wireframes.v1.0.js +++ b/src/config/projectQuestions/wireframes.v1.0.js @@ -136,7 +136,8 @@ const sections = [ description: 'Describe your objectives for creating this application', type: 'textinput', fieldName: 'name', - validationError: 'Screen name cannot be blank' + validationError: 'Screen name cannot be blank', + validations: 'isRequired' }, { icon: 'question', @@ -145,7 +146,8 @@ const sections = [ description: 'What are the important features/capabilities that the screen provides to your end users?', type: 'textbox', fieldName: 'description', - validationError: 'Answer cannot be blank' + validationError: 'Answer cannot be blank', + validations: 'isRequired' }, { icon: 'question', diff --git a/src/projects/detail/components/SpecScreenQuestions.jsx b/src/projects/detail/components/SpecScreenQuestions.jsx index f61677d71..304db4b72 100644 --- a/src/projects/detail/components/SpecScreenQuestions.jsx +++ b/src/projects/detail/components/SpecScreenQuestions.jsx @@ -26,7 +26,8 @@ const SpecScreenQuestions = ({questions, screen}) => { name: q.fieldName, label: q.label, value: _.get(screen, q.fieldName, undefined), - validationError: q.validationError + validationError: q.validationError, + validations: q.validations } let ChildElem = '' switch (q.type) {