Better validation, can now also use notes in expression.

This commit is contained in:
James Cole
2024-03-10 08:08:26 +01:00
parent 5718d1690a
commit 0b45c1aa76
12 changed files with 171 additions and 83 deletions

View File

@@ -79,6 +79,7 @@ class ActionExpression
'due_date',
'process_date',
'destination_transaction_id',
'notes',
];
private ExpressionLanguage $expressionLanguage;
@@ -97,7 +98,7 @@ class ActionExpression
private static function isExpression(string $expr): bool
{
return str_starts_with($expr, '=');
return str_starts_with($expr, '=') && strlen($expr) > 1;
}
private function validate(): ?SyntaxError