(label, value)
| 38 | |
| 39 | /* Validate value to check if it is an integer */ |
| 40 | export function integerValidator(label, value) { |
| 41 | if((_.isUndefined(value) || _.isNull(value) || String(value) === '')) |
| 42 | return null; |
| 43 | if (!/^-?\d*$/.test(value)) { |
| 44 | return sprintf(pgAdmin.Browser.messages.MUST_BE_INT, label); |
| 45 | } |
| 46 | return null; |
| 47 | } |
| 48 | |
| 49 | /* Validate value to check if it is empty */ |
| 50 | export function emptyValidator(label, value) { |
no test coverage detected