Merge branch 'master' into 14466-handling-an-error-which-occurs-when-trying-to-upload...
[arvados.git] / src / validators / is-float.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { isInteger, isNumber } from 'lodash';
6
7 const ERROR_MESSAGE = 'This field must be a float';
8
9 export const isFloat = (value: any) => {
10     return isNumber(value) ? undefined : ERROR_MESSAGE;
11 };