[SDC] Onboarding 1710 rebase.
[sdc.git] / openecomp-ui / src / sdc-app / onboarding / softwareProduct / components / network / SoftwareProductComponentsNICEditorReducer.js
index b3c9fe5..dd37135 100644 (file)
@@ -18,7 +18,7 @@ import {forms} from 'sdc-app/onboarding/softwareProduct/components/SoftwareProdu
 
 export default (state = {}, action) => {
        switch (action.type) {
-               case actionTypes.NICEditor.OPEN:
+               case actionTypes.NICEditor.FILL_DATA:
                        return {
                                ...state,
                                data: action.nic,
@@ -29,6 +29,11 @@ export default (state = {}, action) => {
                                                validations: []
                                        },
                                        'name' : {
+                                               isValid: true,
+                                               errorText: '',
+                                               validations: [{type: 'required', data : true}]
+                                       },
+                                       'networkDescription' : {
                                                isValid: true,
                                                errorText: '',
                                                validations: []
@@ -36,7 +41,7 @@ export default (state = {}, action) => {
                                },
                                formName: forms.NIC_EDIT_FORM
                        };
-               case actionTypes.NICEditor.CLOSE:
+               case actionTypes.NICEditor.CLEAR_DATA:
                        return {};
                default:
                        return state;