@@ -116,7 +116,7 @@ const columnError = (column) => {
116116 return t (' Invalid JSON' );
117117 }
118118 } else if (column .isArray ? .enabled ) {
119- if (column .isArray .uniqueItems ) {
119+ if (! column .isArray .allowDuplicateItems ) {
120120 if (currentValues .value [column .name ].filter ((value , index , self ) => self .indexOf (value) !== index).length > 0 ) {
121121 return t (' Array cannot contain duplicate items' );
122122 }
@@ -149,23 +149,23 @@ const validateValue = (type, value, column) => {
149149 return t (' This field must be longer than {minLength} characters' , { minLength: column .minLength });
150150 }
151151 }
152- // if (['integer', 'decimal', 'float'].includes(type)) {
153- // if (column.minValue !== undefined
154- // && value !== null
155- // && value < column.minValue
156- // ) {
157- // return t('This field must be greater than {minValue}', { minValue: column.minValue });
158- // }
159- // if (column.maxValue !== undefined && value > column.maxValue) {
160- // return t('This field must be less than {maxValue}', { maxValue: column.maxValue });
161- // }
162- // }
163- // if (value && column.validation) {
164- // const error = applyRegexValidation(value, column.validation);
165- // if (error) {
166- // return error;
167- // }
168- // }
152+ if ([' integer' , ' decimal' , ' float' ].includes (type)) {
153+ if (column .minValue !== undefined
154+ && value !== null
155+ && value < column .minValue
156+ ) {
157+ return t (' This field must be greater than {minValue}' , { minValue: column .minValue });
158+ }
159+ if (column .maxValue !== undefined && value > column .maxValue ) {
160+ return t (' This field must be less than {maxValue}' , { maxValue: column .maxValue });
161+ }
162+ }
163+ if (value && column .validation ) {
164+ const error = applyRegexValidation (value, column .validation );
165+ if (error) {
166+ return error;
167+ }
168+ }
169169
170170 return null ;
171171};
0 commit comments