Improve validation methods and make some of them extendable

Created on 27 May 2025, 12 days ago

Problem/Motivation

Points to work

InvalidExpressionException.php
Improve the message

src/Services/CalculationFieldsHandlerExpression.php:25
We could make the validation of deciding what is invalid extendable. Also, improve the current validation.

src/Element/FormCalculationElement.php:83
Make this validation extendable. Webform/Form render can have many elements that group elements, other modules could implement custom elements to create a page or another type of container. Make this method extendable, we allow other modules do whatever they need in case they want to look for the step in another way.

src/Services/CalculationFieldsHandlerExpression.php::validateExpression
We need to improve this validation. To check if the expression is valid for the Symfony/expression-language package, we are replacing the: field values with fake values and checking if it is valid by the expression language by checking if there is any exception being thrown.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇧🇷Brazil joaopauloc.dev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024