diff options
author | Avi Ziv <AVIZI@amdocs.com> | 2017-07-26 17:37:57 +0300 |
---|---|---|
committer | Avi Ziv <avi.ziv@amdocs.com> | 2017-07-26 18:27:22 +0300 |
commit | 61070c9c6b665fdea79b3ccdfeafc3a6b50d262e (patch) | |
tree | dfe9c169cfac91d6c72ac9ff23375f2aafac6405 /openecomp-ui/src/sdc-app/common/reducers/PlainDataReducer.js | |
parent | b824a997e19f6ee9627cb1b1e124c756bd8183fc (diff) |
[SDC] Full OnBoard health-check and NFoD support
Change-Id: I606f8a52c7e6d2bd5558f824957d890e552c5423
Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/common/reducers/PlainDataReducer.js')
-rw-r--r-- | openecomp-ui/src/sdc-app/common/reducers/PlainDataReducer.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openecomp-ui/src/sdc-app/common/reducers/PlainDataReducer.js b/openecomp-ui/src/sdc-app/common/reducers/PlainDataReducer.js index 0bbb5e63be..2276984f7a 100644 --- a/openecomp-ui/src/sdc-app/common/reducers/PlainDataReducer.js +++ b/openecomp-ui/src/sdc-app/common/reducers/PlainDataReducer.js @@ -16,6 +16,7 @@ import {actionTypes} from './PlainDataReducerConstants.js'; import Validator from 'nfvo-utils/Validator.js'; import forOwn from 'lodash/forOwn.js'; +import {other as optionInputOther} from 'nfvo-components/input/inputOptions/InputOptions.jsx'; function updateDataAndValidateReducer(state = {}, action) { let genericFieldInfoCopy; @@ -46,6 +47,12 @@ function updateDataAndValidateReducer(state = {}, action) { forOwn(state.genericFieldInfo,(value, key) => { let val = state.data && state.data[key] ? state.data[key] : ''; let result = Validator.validate(key, val, state.genericFieldInfo[key].validations, state, {}); + if(val.choice !== undefined) { + result = Validator.validate(key, val.choice, state.genericFieldInfo[key].validations, state, {}); + } + if(val.choice !== undefined && val.choice === optionInputOther.OTHER) { + result = Validator.validate(key, val.other, state.genericFieldInfo[key].validations, state, {}); + } genericFieldInfoCopy[key] = {...genericFieldInfoCopy[key], isValid: result.isValid, errorText: result.errorText}; if (!result.isValid) { formReady = false; |