X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/757caa452374ab9e46d2b80c6c4b8aa10df5cd02..12531884583ab85a114eed12f5179ed0b5fb8a88:/src/validators/max-length.tsx

diff --git a/src/validators/max-length.tsx b/src/validators/max-length.tsx
index 9b6d248b98..922e3e5270 100644
--- a/src/validators/max-length.tsx
+++ b/src/validators/max-length.tsx
@@ -11,14 +11,12 @@ interface MaxLengthProps {
 }
 
 // TODO types for maxLength
-const maxLength: any = (maxLengthValue = DEFAULT_MAX_VALUE, errorMessage = ERROR_MESSAGE) => {
+export const maxLength: any = (maxLengthValue = DEFAULT_MAX_VALUE, errorMessage = ERROR_MESSAGE) => {
     return (value: string) => {
         if (value) {
-            return  value && value && value.length <= maxLengthValue ? undefined : `${errorMessage || ERROR_MESSAGE} ${maxLengthValue}`;
+            return  value && value.length <= maxLengthValue ? undefined : `${errorMessage || ERROR_MESSAGE} ${maxLengthValue}`;
         }
 
         return undefined;
     };
 };
-
-export default maxLength;
