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

diff --git a/src/validators/max-length.tsx b/src/validators/max-length.tsx
index 1f8e5095ca..370aa4c3a2 100644
--- a/src/validators/max-length.tsx
+++ b/src/validators/max-length.tsx
@@ -5,20 +5,12 @@
 export const ERROR_MESSAGE = 'Maximum string length of this field is: ';
 export const DEFAULT_MAX_VALUE = 60;
 
-interface MaxLengthProps {
-    maxLengthValue: number;  
-    defaultErrorMessage: string;
-}
-
-// 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
