X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/d8619a37a078f72f4be154a3b82894810ebebf36..31e84a9315728c2f58a26bf0e9e1d2b38326fb86:/src/validators/max-length.tsx

diff --git a/src/validators/max-length.tsx b/src/validators/max-length.tsx
index 1f8e5095..370aa4c3 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
