1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
6 const ERROR_MESSAGE = "Name cannot be '.' or '..' or contain '/' characters";
8 export const invalidNamingRules = [/\//, /^\.{1,2}$/];
10 export const validName = (value: string) => {
11 return invalidNamingRules.find(aRule => value.match(aRule) !== null)