21700: Install Bundler system-wide in Rails postinst
[arvados.git] / services / workbench2 / src / validators / is-integer.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { isInteger as isInt } from 'lodash';
6
7 const ERROR_MESSAGE = 'This field can only contain integer values';
8
9 export const isInteger = (value: any) => {
10     return isInt(value) ? undefined : ERROR_MESSAGE;
11 };