Restore TAG_VALUE_VALIDATION
[arvados-workbench2.git] / src / views-components / resource-properties-form / property-value-field.tsx
index 56eaf6d5674c3ccfb5f2c1bc83004f3ebf69af79..db2db3f7ece5e63ed7656f2f3a417996b3238dad 100644 (file)
@@ -7,9 +7,9 @@ import { WrappedFieldProps, Field, formValues } from 'redux-form';
 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 { VocabularyProp, connectVocabulary, buildProps } from '~/views-components/resource-properties-form/property-field-common';
+import { TAG_VALUE_VALIDATION } from '~/validators/validators';
 
 interface PropertyKeyProp {
     propertyKey: string;
@@ -39,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) =>