feat: add asyncValidtionExpression property to form field/container model - #1923
Open
vdua wants to merge 2 commits into
Open
feat: add asyncValidtionExpression property to form field/container model#1923vdua wants to merge 2 commits into
vdua wants to merge 2 commits into
Conversation
…odel Mirrors validationExpression (interface default, JCR-bound field/getter in AbstractBaseImpl, allow-listed in the 0.15.2 JSON schema) without the paired constraint-message wiring. RuleUtils.js now also scans the property for custom function references, same as validationExpression. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The property is rolling out to a limited set of customer instances first, so AbstractBaseImpl#getAsyncValidtionExpression() now returns null unless the toggle is enabled, mirroring the FT_SKIP_ITEMS_MAP / FT_SKIP_DEFAULT_SET_PROPERTY_EVENT pattern. Jira: FORMS-26583. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
rismehta
reviewed
Jul 21, 2026
| public static final String PN_DOR_TEMPLATE_REF = "dorTemplateRef"; | ||
| public static final String PN_DOR_TYPE = "dorType"; | ||
| public static final String PN_VALIDATION_EXPRESSION = "validationExpression"; | ||
| public static final String PN_ASYNC_VALIDATION_EXPRESSION = "asyncValidtionExpression"; |
Collaborator
|
@vdua You need to update the spec as well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
asyncValidtionExpression(JCR property name intentionally matches, typo included) to the form field/container Sling Model, mirroring the existingvalidationExpressionproperty.AbstractBaseImpl), so it's automatically exposed on everyField/Containersubtype (text input, number input, date picker, panel, etc.) without per-component overrides.0.15.2JSON schema fixtures used by tests, in the same 11 field-type blocks that already permitvalidationExpression.RuleUtils.jsnow also scansasyncValidtionExpressionfor custom function references (same treatment asvalidationExpression), so custom functions referenced only in async validation expressions still get registered onwindow.Out of scope (explicitly, per discussion): a paired constraint-message property (
validateExpMessage-style) and any authoring/dialog UI — this PR only adds the raw expression property to the model and schema.Changes
BaseConstraint.java(default method),ReservedProperties.java(JCR property constant),AbstractBaseImpl.java(@ValueMapValuefield +@JsonInclude(NON_EMPTY)getter)adaptive-form-data-constraints.schema.json,adaptive-form.schema.json(0.15.2)BaseConstraintTest,TextInputImplTest(blank-value suppression + populated round-trip export/schema validation)RuleUtils.js+RuleUtils.test.jsdocs/architecture/overview.mdon deriving golden-fileids from a failing-test diff instead of hand-computing themTest plan
TextInputImplTest— 62/62 passing (mvn surefire:test -Dtest=TextInputImplTest)BaseConstraintTest— 4/4 passingRuleUtils.test.js— 12/12 passing (npx jest RuleUtils.test.js)🤖 Generated with Claude Code