mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:47:10 +00:00
fix(plugin-workflow): fix formula validation for expression (#4957)
Some checks failed
auto-merge / push-commit (push) Waiting to run
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase FrontEnd Test / frontend-test (18) (push) Has been cancelled
Some checks failed
auto-merge / push-commit (push) Waiting to run
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase FrontEnd Test / frontend-test (18) (push) Has been cancelled
This commit is contained in:
parent
f7db3bd291
commit
f713beae80
@ -45,7 +45,7 @@ export default class extends Instruction {
|
||||
['x-validator'](value, rules, { form }) {
|
||||
const { values } = form;
|
||||
const { evaluate } = evaluators.get(values.engine) as Evaluator;
|
||||
const exp = value.trim().replace(/{{([^{}]+)}}/g, ' 1 ');
|
||||
const exp = value.trim().replace(/{{([^{}]+)}}/g, ' "1" ');
|
||||
try {
|
||||
evaluate(exp);
|
||||
return '';
|
||||
|
@ -409,7 +409,7 @@ export default class extends Instruction {
|
||||
['x-validator'](value, rules, { form }) {
|
||||
const { values } = form;
|
||||
const { evaluate } = evaluators.get(values.engine);
|
||||
const exp = value.trim().replace(/{{([^{}]+)}}/g, ' 1 ');
|
||||
const exp = value.trim().replace(/{{([^{}]+)}}/g, ' "1" ');
|
||||
try {
|
||||
evaluate(exp);
|
||||
return '';
|
||||
|
Loading…
Reference in New Issue
Block a user