projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
19969: Pass required prop to generic input to allow disabling required asterisk on...
[arvados-workbench2.git]
/
src
/
validators
/
is-number.tsx
diff --git
a/src/validators/is-number.tsx
b/src/validators/is-number.tsx
index 152c647fe47ee87fc49f9329b5b6dd6102b48967..b43eec956cb927f7c9d4058da05479dbbca9e15c 100644
(file)
--- a/
src/validators/is-number.tsx
+++ b/
src/validators/is-number.tsx
@@
-3,7
+3,7
@@
// SPDX-License-Identifier: AGPL-3.0
import { isNumber as isNum } from 'lodash';
// SPDX-License-Identifier: AGPL-3.0
import { isNumber as isNum } from 'lodash';
-const ERROR_MESSAGE = 'This field
must be a number
';
+const ERROR_MESSAGE = 'This field
can only contain numeric values
';
export const isNumber = (value: any) => {
return !isNaN(value) && isNum(value) ? undefined : ERROR_MESSAGE;
export const isNumber = (value: any) => {
return !isNaN(value) && isNum(value) ? undefined : ERROR_MESSAGE;