File tree Expand file tree Collapse file tree 4 files changed +5
-8
lines changed
components/molecules/ValidationCriteria Expand file tree Collapse file tree 4 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ const DraggableItem = ({
69
69
item . id === id ? { ...item , fieldName : newValue } : item
70
70
)
71
71
) ;
72
- if ( newValue ?. toLowerCase ( ) === 'rowid' ) setValidationRuleError ( true ) ;
73
72
} , [ ] ) ;
74
73
75
74
const changeDataType = ( id : string | number , value : string ) => {
@@ -79,7 +78,7 @@ const DraggableItem = ({
79
78
updatedItems && setValidationRules ( updatedItems ) ;
80
79
} ;
81
80
82
- const getErrorMessage = ( item : ValidationRule ) => {
81
+ const getErrorMessage = ( item : ValidationRule ) => {
83
82
if ( validationRuleError ) {
84
83
if ( ! item . fieldName ) {
85
84
return t ( 'datasetGroups.detailedView.fieldName' ) ;
@@ -95,7 +94,7 @@ const DraggableItem = ({
95
94
} ) ;
96
95
}
97
96
}
98
- return '' ;
97
+ return '' ;
99
98
} ;
100
99
101
100
return (
Original file line number Diff line number Diff line change @@ -42,9 +42,7 @@ const ValidationCriteriaRowsView: FC<
42
42
) ;
43
43
44
44
if (
45
- isFieldNameExisting ( validationRules , newValue ) ||
46
- newValue ?. toLowerCase ( ) === 'rowid'
47
- ) {
45
+ isFieldNameExisting ( validationRules , newValue ) ) {
48
46
setValidationRuleError ( true ) ;
49
47
}
50
48
} ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ const CreateDatasetGroup: FC = () => {
54
54
const [ validationErrorType , setValidationErrorType ] =
55
55
useState < ValidationErrorTypes > ( ValidationErrorTypes . NULL ) ;
56
56
57
- const validateData = useCallback ( ( ) => {
57
+ const validateData = useCallback ( ( ) => {
58
58
setNodesError ( validateClassHierarchy ( nodes ) ) ;
59
59
setDatasetNameError ( ! datasetName ) ;
60
60
setValidationRuleError ( validateValidationRules ( validationRules ) ) ;
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export const validateClassHierarchy = (data: Class[]) => {
88
88
89
89
export const validateValidationRules = ( data : ValidationRule [ ] | undefined ) => {
90
90
for ( let item of data ) {
91
- if ( item . fieldName === '' || item . dataType === '' ) {
91
+ if ( item . fieldName === '' || item . dataType === '' || item . fieldName . toLowerCase ( ) === 'rowid' ) {
92
92
return true ;
93
93
}
94
94
}
You can’t perform that action at this time.
0 commit comments