You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2026/09/14 10:20:25 UTC
(struts-site) branch main updated: WW-5740 Visitor-nested constraint messages resolve like validation does (#334)
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/main by this push:
new 86a4d279c WW-5740 Visitor-nested constraint messages resolve like validation does (#334)
86a4d279c is described below
commit 86a4d279c6358594675ef599f3a70267d1386bcf
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Mon Sep 14 12:20:21 2026 +0200
WW-5740 Visitor-nested constraint messages resolve like validation does (#334)
Co-authored-by: Claude Opus 5 (1M context) <no...@anthropic.com>
---
source/core-developers/client-side-validation.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/core-developers/client-side-validation.md b/source/core-developers/client-side-validation.md
index eff723918..1b7157d27 100644
--- a/source/core-developers/client-side-validation.md
+++ b/source/core-developers/client-side-validation.md
@@ -75,7 +75,7 @@ an `int` or `double` validator is attached to it.
| `date` | — | nothing yet; temporal `min`/`max` is deferred to a future release |
| `email`, `url`, `creditcard` | — | never emitted |
| `fieldexpression`, `expression`, `conversion` | — | never emitted |
-| `visitor` | — | nothing for the visitor itself; the visited object's own validators apply to its nested fields (`user.name`) exactly as if they were declared on the action |
+| `visitor` | — | nothing for the visitor itself; the visited object's own validators apply to its nested fields (`user.name`) exactly as if they were declared on the action, and their messages resolve as during validation — the visited class's bundle first, then the action's, with `${...}` read from the visited object when it exists |
| any validator carrying a message | `data-msg-<validatorType>` | always added on a control that submits a value, including for validators that emit no constraint attribute at all; never on `<s:label>` or a control of an unknown `type` |
Two of these conditions are easy to miss and sharply limit how often `required`, `minlength`/`maxlength`,