X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/62ff5a943865229c1630c66366f824511048ce63..HEAD:/src/validators/is-rsa-key.tsx

diff --git a/src/validators/is-rsa-key.tsx b/src/validators/is-rsa-key.tsx
index 7620a801..d41b0929 100644
--- a/src/validators/is-rsa-key.tsx
+++ b/src/validators/is-rsa-key.tsx
@@ -6,5 +6,5 @@
 const ERROR_MESSAGE = 'Public key is invalid';
 
 export const isRsaKey = (value: any) => {
-    return value.match(/ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3} ([^@]+@[^@]+)/i) ? undefined : ERROR_MESSAGE;
+    return value.match(/ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}(( [^@]+@[^@]+)|$)/i) ? undefined : ERROR_MESSAGE;
 };
