CR changes
[arvados-workbench2.git] / src / validators / require.tsx
index 8ac3401c44860d7b6a34e62f16f42f0f335a98ef..f636850d5a9f0a13acfe909a3346cd3da2f3882b 100644 (file)
@@ -4,13 +4,11 @@
 
 export const ERROR_MESSAGE = 'This field is required.';
 
-interface RequireProps {
+interface RequiredProps {
     value: string;
 }
 
 // TODO types for require
-const require: any = (value: string, errorMessage = ERROR_MESSAGE) => {
-    return value && value.toString().length > 0 ? undefined : ERROR_MESSAGE;
+export const require: any = (value: string) => {
+    return value && value.length > 0 ? undefined : ERROR_MESSAGE;
 };
-
-export default require;