18874: Add 'services/workbench2/' from commit 'f6f88d9ca9cdeeeebfadcfe999789bfb9f69e5c6'
[arvados.git] / services / workbench2 / src / validators / require.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 export const ERROR_MESSAGE = 'This field is required.';
6
7 export const require: any = (value: string) => {
8     return value && value.length > 0 ? undefined : ERROR_MESSAGE;
9 };