change code after CR
[arvados-workbench2.git] / src / views-components / resource-properties-form / property-value-field.tsx
index ff0959d9423c10e2ea5ad8912d7a2ae753a2568c..db2db3f7ece5e63ed7656f2f3a417996b3238dad 100644 (file)
@@ -4,13 +4,12 @@
 
 import * as React from 'react';
 import { WrappedFieldProps, Field, formValues } from 'redux-form';
-import { identity } from 'lodash';
 import { compose } from 'redux';
 import { Autocomplete } from '~/components/autocomplete/autocomplete';
 import { Vocabulary } from '~/models/vocabulary';
-import { require } from '~/validators/require';
 import { PROPERTY_KEY_FIELD_NAME } from '~/views-components/resource-properties-form/property-key-field';
-import { ITEMS_PLACEHOLDER, VocabularyProp, connectVocabulary, hasError, getErrorMsg, handleBlur, buildProps } from '~/views-components/resource-properties-form/property-field-common';
+import { VocabularyProp, connectVocabulary, buildProps } from '~/views-components/resource-properties-form/property-field-common';
+import { TAG_VALUE_VALIDATION } from '~/validators/validators';
 
 interface PropertyKeyProp {
     propertyKey: string;
@@ -40,8 +39,8 @@ const PropertyValueInput = ({ vocabulary, propertyKey, ...props }: WrappedFieldP
 
 const getValidation = (props: PropertyValueFieldProps) =>
     isStrictTag(props.propertyKey, props.vocabulary)
-        ? [require, matchTagValues(props)]
-        : [require];
+        ? [...TAG_VALUE_VALIDATION, matchTagValues(props)]
+        : TAG_VALUE_VALIDATION;
 
 const matchTagValues = ({ vocabulary, propertyKey }: PropertyValueFieldProps) =>
     (value: string) =>