Add ssh keys panel
[arvados-workbench2.git] / src / validators / validators.tsx
index edc472657eb3178036fb0d8b3917dd0600e39ce5..1980ed802eb15ef57a64d04667e1ae7ede3fe2fe 100644 (file)
@@ -4,6 +4,7 @@
 
 import { require } from './require';
 import { maxLength } from './max-length';
+import { isRsaKey } from './is-rsa-key';
 
 export const TAG_KEY_VALIDATION = [require, maxLength(255)];
 export const TAG_VALUE_VALIDATION = [require, maxLength(255)];
@@ -19,4 +20,7 @@ export const COPY_FILE_VALIDATION = [require];
 
 export const MOVE_TO_VALIDATION = [require];
 
-export const PROCESS_NAME_VALIDATION = [require, maxLength(255)];
\ No newline at end of file
+export const PROCESS_NAME_VALIDATION = [require, maxLength(255)];
+
+export const SSH_KEY_PUBLIC_VALIDATION = [require, isRsaKey, maxLength(1024)];
+export const SSH_KEY_NAME_VALIDATION = [require, maxLength(255)];
\ No newline at end of file