Browse Source

fix: replace formula needs min 3 arg

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/1292/head
Raju Udava 3 years ago
parent
commit
e27960ee07
  1. 34
      packages/nc-gui/helpers/formulaList.js

34
packages/nc-gui/helpers/formulaList.js

@ -1,32 +1,32 @@
const validations = { const validations = {
AVG: { AVG: {
validation: { validation: {
args: { min: 1 } args: { min: 1 },
} },
}, },
ADD: { ADD: {
validation: { validation: {
args: { min: 1 } args: { min: 1 },
} },
}, },
AND: { AND: {
validation: { validation: {
args: { min: 1 } args: { min: 1 },
} },
}, },
OR: { OR: {
validation: { validation: {
args: { min: 1 } args: { min: 1 },
} },
}, },
CONCAT: { CONCAT: {
validation: { args: { min: 1 } } validation: { args: { min: 1 } },
}, },
TRIM: { TRIM: {
validation: { args: { min: 1 } } validation: { args: { min: 1 } },
}, },
UPPER: { UPPER: {
validation: { args: { rqd: 1 } } validation: { args: { rqd: 1 } },
}, },
LOWER: { validation: { args: { rqd: 1 } } }, LOWER: { validation: { args: { rqd: 1 } } },
LEN: { validation: { args: { rqd: 1 } } }, LEN: { validation: { args: { rqd: 1 } } },
@ -43,18 +43,18 @@ const validations = {
SQRT: { validation: { args: { rqd: 1 } } }, SQRT: { validation: { args: { rqd: 1 } } },
ABS: { validation: { args: { rqd: 1 } } }, ABS: { validation: { args: { rqd: 1 } } },
NOW: { validation: { args: { rqd: 0 } } }, NOW: { validation: { args: { rqd: 0 } } },
REPLACE: { validation: { args: { rqd: 2 } } }, REPLACE: { validation: { args: { rqd: 3 } } },
SEARCH: { validation: { args: { rqd: 2 } } }, SEARCH: { validation: { args: { rqd: 2 } } },
INT: { validation: { args: { rqd: 1 } } }, INT: { validation: { args: { rqd: 1 } } },
RIGHT: { validation: { args: { rqd: 2 } } }, RIGHT: { validation: { args: { rqd: 2 } } },
LEFT: { LEFT: {
validation: { args: { rqd: 1 } } validation: { args: { rqd: 1 } },
}, },
SUBSTR: { validation: { args: { min: 2, max: 3 } } }, SUBSTR: { validation: { args: { min: 2, max: 3 } } },
MID: { validation: { args: { rqd: 1 } } }, MID: { validation: { args: { rqd: 1 } } },
IF: { validation: { args: { min: 2, max: 3 } } }, IF: { validation: { args: { min: 2, max: 3 } } },
SWITCH: { validation: { args: { min: 3 } } } SWITCH: { validation: { args: { min: 3 } } },
} };
export default Object.keys(validations) export default Object.keys(validations);
export { validations } export { validations };

Loading…
Cancel
Save