21700: Install Bundler system-wide in Rails postinst
[arvados.git] / services / workbench2 / src / validators / is-rsa-key.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5
6 const ERROR_MESSAGE = 'Public key is invalid';
7
8 export const isRsaKey = (value: any) => {
9     return value.match(/ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}(( [^@]+@[^@]+)|$)/i) ? undefined : ERROR_MESSAGE;
10 };