X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/10ce16c28de952f6533ca3cc9df909269e3d2a53..c3644a28ef0a80c193361f56627bbe9e556aacaa:/src/validators/max-length.tsx

diff --git a/src/validators/max-length.tsx b/src/validators/max-length.tsx
index 1f8e5095..922e3e52 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;
\ No newline at end of file
