1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { require } from './require';
6 import { maxLength } from './max-length';
7 import { isRsaKey } from './is-rsa-key';
9 export const TAG_KEY_VALIDATION = [require, maxLength(255)];
10 export const TAG_VALUE_VALIDATION = [require, maxLength(255)];
12 export const PROJECT_NAME_VALIDATION = [require, maxLength(255)];
14 export const COLLECTION_NAME_VALIDATION = [require, maxLength(255)];
15 export const COLLECTION_DESCRIPTION_VALIDATION = [maxLength(255)];
16 export const COLLECTION_PROJECT_VALIDATION = [require];
18 export const COPY_NAME_VALIDATION = [require, maxLength(255)];
19 export const COPY_FILE_VALIDATION = [require];
21 export const MOVE_TO_VALIDATION = [require];
23 export const PROCESS_NAME_VALIDATION = [require, maxLength(255)];
25 export const REPOSITORY_NAME_VALIDATION = [require, maxLength(255)];
27 export const USER_EMAIL_VALIDATION = [require, maxLength(255)];
28 export const USER_LENGTH_VALIDATION = [maxLength(255)];
30 export const SSH_KEY_PUBLIC_VALIDATION = [require, isRsaKey, maxLength(1024)];
31 export const SSH_KEY_NAME_VALIDATION = [require, maxLength(255)];
33 export const MY_ACCOUNT_VALIDATION = [require];