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

commit 45e0b65c49bcbe22b31f1c46c3e1f678087d0dae
Author: Lukasz Lenart <[email protected]>
AuthorDate: Thu Nov 19 08:09:57 2026 +0100

    WW-3624 docs: add a regex example to the fielderror tag
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 source/tag-developers/fielderror-tag.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/source/tag-developers/fielderror-tag.md 
b/source/tag-developers/fielderror-tag.md
index 912d937ad8..40f97f3ad5 100644
--- a/source/tag-developers/fielderror-tag.md
+++ b/source/tag-developers/fielderror-tag.md
@@ -59,3 +59,13 @@ or
 <s:fielderror fieldName="field1" />
 <s:fielderror fieldName="field1" />
 ```
+
+**Example 3**: display field errors whose names match a regular expression 
(since Struts 7.5.0)
+
+```jsp
+<s:fielderror fieldName="users\[0\]\..*" regex="true" />
+```
+
+With `regex="true"` the `fieldName` attribute and nested `s:param` values are 
regular expressions matched against
+the whole field error name, here every error of the first row of an iterated 
`users` list. Each field error is
+rendered once, even when several patterns match it.

Reply via email to