(label, value)
| 28 | |
| 29 | /* Validate value to check if it is a number */ |
| 30 | export function numberValidator(label, value) { |
| 31 | if((_.isUndefined(value) || _.isNull(value) || String(value) === '')) |
| 32 | return null; |
| 33 | if (!/^-?\d+(\.?\d*)$/.test(value)) { |
| 34 | return sprintf(pgAdmin.Browser.messages.MUST_BE_NUM, label); |
| 35 | } |
| 36 | return null; |
| 37 | } |
| 38 | |
| 39 | /* Validate value to check if it is an integer */ |
| 40 | export function integerValidator(label, value) { |
no test coverage detected