1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 export const ERROR_MESSAGE = 'This field is required.';
7 interface RequireProps {
11 // TODO types for require
12 const require: any = (value: string, errorMessage = ERROR_MESSAGE) => {
13 return value && value.toString().length > 0 ? undefined : ERROR_MESSAGE;
16 export default require;