You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wei Xu <ta...@hotmail.com> on 2007/07/09 04:35:54 UTC
[S2] Wildcard characters in Action-validation.xml
I plan to use Struts validation frame to validate my input fields. I want to
konw if there is a way to use wildcard characters such as "*?" in my
validtion.xml.
For instance:
<validator type="stringlength">
<param name="fieldName">My*Book</param>
<param name="maxLength">1</param>
<param name="trim">true</param>
<message>
<![CDATA[The book name must be a single character]]>
</message>
</validator>
Here, this fieldName could be "MyOldBook", "MyNewBook", "MyBook" etc.
I never see this style configuration, and it DOES NOT work yet. Is there any
way to make Struts work in this way?
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Wildcard characters in Action-validation.xml
Posted by Don Brown <do...@gmail.com>.
Nope, it currently isn't supported, although it is a great idea. I
think there may be a JIRA ticket already for it, but if you can't find
any, please create one. Of course, patches are very appreciated :)
Don
On 7/9/07, Wei Xu <ta...@hotmail.com> wrote:
> I plan to use Struts validation frame to validate my input fields. I want to
> konw if there is a way to use wildcard characters such as "*?" in my
> validtion.xml.
>
> For instance:
>
> <validator type="stringlength">
> <param name="fieldName">My*Book</param>
> <param name="maxLength">1</param>
> <param name="trim">true</param>
> <message>
> <![CDATA[The book name must be a single character]]>
> </message>
> </validator>
>
> Here, this fieldName could be "MyOldBook", "MyNewBook", "MyBook" etc.
>
> I never see this style configuration, and it DOES NOT work yet. Is there any
> way to make Struts work in this way?
>
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search!
> http://search.msn.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org