Have the action extend ActionSupport and have the class implement its own:
public validate(void).
Look at the code of ActionSupport (or JavaDoc) for how to set error
messages, if an error is set, after validate() executes, Struts2 will
assume an error has occurred and the action will return "input
Had a look in the soruce for 2.21 AnnotationActionValidatorManager line 226
replaces any / in the action alias with -. So in the example below I would
have to give the file the succinct name
CreatePortalUserAction-CreatePortalUser-persistCustomer-validation.xml :-)
On Thu, Nov 4, 2010 at 12:00 PM,
Hi,
validator-rules contents:
Thanks again,
André
From: Martin Gainty
To: acastanheira2...@yahoo.com.br
Sent: Monday, October 5, 2009 3:19:25 PM
Subject: RE: Struts validation (validwhen)
please post contents of validator-rules.xml
Martin Gainty
Hi Dale.
Thank you for your answer. See my comments below.
--
Robi
Dale Newfield wrote:
Roberto Nunnari wrote:
..but in order to add declarative validation, that would require
a file named:
CategoryAction/create-validation.xml
Oops.. little typo! That should read:
CategoryAction-Category/c
Roberto Nunnari wrote:
..but in order to add declarative validation, that would require
a file named:
CategoryAction/create-validation.xml
but '/' is not a character allowed in filenames.
Did you actually try putting the validation file at
CategoryAction/create-validation.xml (i.e.: in a subd
http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html
Thanks,
Nuwan
Sonu S wrote:
Hi,
I am using struts in my application. to validate users entry in jsp i have
my validation method. and i am calling that method in action class. code is
below:(I am not using struts' validatio
Hi.
Thank you very much Dave. my problem solved.
Anet.
Dave Newton <[EMAIL PROTECTED]> wrote:
--- Anet wrote:
> whats your mean about rendering tag property?
It ate part of my text; I was asking if it renders a tag.
If not, you'd have to put it inside one--I just don't remember much
--- Anet <[EMAIL PROTECTED]> wrote:
> whats your mean about rendering tag property?
It ate part of my text; I was asking if it renders a tag.
If not, you'd have to put it inside one--I just don't remember much about S1
any more.
> everything is ok. just validation doesn't work.
Hi Dave;
whats your mean about rendering tag property?
everything is ok. just validation doesn't work.
I use struts 1.1 .
Dave Newton <[EMAIL PROTECTED]> wrote:
--- Anet wrote:
> I have an strange problem with struts validation. Everything is ok.
...
> but java script created by strut
--- Anet <[EMAIL PROTECTED]> wrote:
> I have an strange problem with struts validation. Everything is ok.
...
> but java script created by struts are shown on top of my page, where I put
>
Is it rendering the tag properly? Which version of S1 are you
using?
Dave
-
I fixed it using the session option...cudnt find the better way though..
anyways thanks for your help
Jiang, Jane (NIH/NCI) [C] wrote:
>
> We had the same problem. When you submit a form, only the information
> in form gets submitted and repopulated when there is a validation error.
> Since th
We had the same problem. When you submit a form, only the information
in form gets submitted and repopulated when there is a validation error.
Since the list is not part of form submission, it is not saved any
where. The same applies to disabled fields and dynamically generated
labels. I asked t
I am using tile page as an input.
Thx
Paul Benedict-2 wrote:
>
> Can you paste in the set of action configuration mappings that you're
> using?
>
> On Dec 10, 2007 9:37 AM, Vaibhav Khare <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi,
>>
>> I am using Struts validation framework in my project. My f
Can you paste in the set of action configuration mappings that you're using?
On Dec 10, 2007 9:37 AM, Vaibhav Khare <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am using Struts validation framework in my project. My form becomes null
> whenever I try to do some validation. The validation works fine b
u.
-Cesar
PS Found those pages while googling for "struts validatior dtd"
- Original Message
From: rapsy <[EMAIL PROTECTED]>
To: user@struts.apache.org
Sent: Thursday, October 4, 2007 12:02:11 PM
Subject: Re: Struts validation error on Jdeveloper 10.1.3.3
I don't
I don't think that matters but I gave a try just in case. The error message
is now changed to:
(Error) Invalid element 'arg0' in content of 'field', expected elements
'[msg, arg, var]'.
Thanks for your reply!
Cesar Arevalo wrote:
>
> Hey Rapsy,
>
> just a quick thought, shouldn't the argument
Hey Rapsy,
just a quick thought, shouldn't the arguments start at index 0? this meaning
that you should have
??
-Cesar
- Original Message
From: rapsy <[EMAIL PROTECTED]>
To: user@struts.apache.org
Sent: Thursday, October 4, 2007 11:27:27 AM
Subject: Struts
Nosinov,
The feature to display the error value in a validation message is part
of the next release of Validator (1.4). At the moment, no current
releases allow this feature. If you want, you can help submit a patch
for that feature:
https://issues.apache.org/jira/browse/VALIDATOR
Paul
Nosi
i've in my struts-config.xml:
can you send us the struts-config.xml related portion?
El vie, 06-07-2007 a las 10:31 +0200, Anja Fischer, IBE escribió:
> Hi all,
>
> I use the struts validation plugin. Now tomcat runs into a
> javax.servlet.UnavailableException: Cannot load a validato
"^\w{2}-\w{6}(-\w{2}){0,5}$ | ^[0-9]{4,6}$"
"^\\w{2}-\\w{6}(-\\w{2}){0,5}|([0-9]{4,6})$";
Are different you are missing the ^ sign after the | operator...
Please read the regular expression book properly ..
-Original Message-
From: Ferruh Zamangör [mailto:[EMAIL PROTECTED]
S
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Peter,
Peter L. Berghold wrote:
>
Oh, and make sure that your file gets put into WEB-INF/classes (or some
subdirectory thereof), or by some other means into the classpath. I
don't think it'll work if it's just in WEB-INF.
- -chris
-BEGIN PGP S
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Peter,
Peter L. Berghold wrote:
>
Hmm... I don't usually put stuff like this in "packages" but you might
want to use slashes instead of dots. Give it a try and see...
> When the form is submitted completely blank (which should generate an
> error..
On 10/23/06, Ed Griebel <[EMAIL PROTECTED]> wrote:
(Redirecting response to user list where this type of question belongs...)
You can swap in the new validator version without any changes to the
rest of your application; the commons-validator team run a regression
test at the binary level. This
(Redirecting response to user list where this type of question belongs...)
You can swap in the new validator version without any changes to the
rest of your application; the commons-validator team run a regression
test at the binary level. This page has a complete list of what jars
need to be upd
Givler, Eric wrote:
But can't you just define a message specific to the field and validator for
each definition in the validations.xml file?
min0
max50
Yes, yes I can... good old struts documentation. :) I fi
But can't you just define a message specific to the field and validator for
each definition in the validations.xml file?
min0
max50
-Original Message-
From: Scott Van Wart [mailto:[EMAIL PROTECTED]
Sent: Tue
Hi
You also need to put in "... onSubmit="return validateValidationForm(this);" in
your html:form tag.
Also: you should name your forms like: validationForm, not ValidationForm.
Hermod
-Original Message-
From: red phoenix [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 04, 2006 9:38 AM
T
Wendy,
That worked! Many thanks.
Jim
On 4/21/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:
>
> On 4/21/06, James Savage <[EMAIL PROTECTED]> wrote:
> > However, when a validation error message is returned (because
> > nothing was entered), only the form with the validation message is
> > displayed
On 4/21/06, James Savage <[EMAIL PROTECTED]> wrote:
> However, when a validation error message is returned (because
> nothing was entered), only the form with the validation message is
> displayed, but not the Tiles header, footer and menu. Is there something
> else I need to do to get the form wi
As a quick fix i changed the validator-rules.xml file. I added the
following:
*if (field == undefined) {*
* isValid = true;*
} else if {
}
I did this for required and mask rules. This solved the problem for me.
Thanks for your response. Moreover with the version of validator framework i
a
Madhav Bhargava wrote:
Hi All,
I am using Struts 1.0 and struts-validator 1.0.
I have a JSP which has 3 tabs. Each tab body has a different element
inside it. I am using Ajax to dynamically generate the tab body content.
Let me take an example and explain it. Assume there are 2 tabs - Tab1 and
Thanks Bart,
I will try and do as you said. Thanks a lot
Regards,
Sahil Gupta
-Original Message-
From: Bart Busschots [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 5:51 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
The reason you can use a space is
delete this message. Thank you for your cooperation.
-Original Message-
From: Bart Busschots [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 4:05 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
Can you show me the current version of your mask and a sample of an
inp
om: Bart Busschots [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 5:02 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
Hi Sahil,
I'm 90% sure the problem here is that some more of the special characters in
your large character class need to be escaped out. Thing is I c
or authorized to receive this for the addressee,
> you
> >must not use, copy, disclose or take any action based on this message or
> any
> >information herein. If you have received this message in error, please
> >advise the sender immediately by reply e-mail and delete this mess
ion.
-Original Message-
From: Bart Busschots [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 4:05 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
Can you show me the current version of your mask and a sample of an input it
is rejecting?
Bart.
Sahil Gupta wr
Sent: Thursday, March 30, 2006 4:05 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
Can you show me the current version of your mask and a sample of an input it
is rejecting?
Bart.
Sahil Gupta wrote:
>
>Thanks Bart,
>Yes, what you said was right, so I have changed \ t
Message-
From: Bart Busschots [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 3:39 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
OK, so your Regular expression is trying to match everything between the
start (^) and the end ($) of your input and no where in it do you
Mailing List
Subject: Re: Struts Validation
OK, so your Regular expression is trying to match everything between the
start (^) and the end ($) of your input and no where in it do you allow a
new line character, hence it is failing. You need to allow \n in which ever
part of the RE you are happy to have
54 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
Can you show us the mask you currently use and then we will have a better
chance of being able to help.
Bart.
Sahil Gupta wrote:
Hi,
I have used Masking in Validations. I have a text area in which I have
only restri
4 PM
To: Struts Users Mailing List
Subject: Re: Struts Validation
Can you show us the mask you currently use and then we will have a better
chance of being able to help.
Bart.
Sahil Gupta wrote:
>Hi,
>
>I have used Masking in Validations. I have a text area in which I have
>only
Can you show us the mask you currently use and then we will have a
better chance of being able to help.
Bart.
Sahil Gupta wrote:
Hi,
I have used Masking in Validations. I have a text area in which I have
only restricted some special characters. But still if I press Enter
while adding some te
Krishna, Mattam (M.) asked:
> > What is the meaning of "^\(?(\d{3})\)?[-| ]?(\d{3})[-|
> ]?(\d{4})$" in
> > the above code.?
It's the regular expression for a US-style phone number.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
> encourage you to look at the english example at
> http://www.reumann.net/struts/lesson3/step7.do
> Kind Regards,
> Martin-
>
> - Original Message -
> From: "Laurie Harper" <[EMAIL PROTECTED]>
> To:
> Sent: Friday, October 28, 2005 8:28 PM
8:28 PM
Subject: Re: Struts Validation Rule for Single Java Bean form-property
Yujun Liang wrote:
Laurie,
Thanks for the suggestion, just let you know I tried that and it seems
not working, thus I am not sure whether this can be enhanced by Struts
team since Java Bean inside Form Bean is a val
rds
Yujun Liang
[EMAIL PROTECTED]
(0408) 467 448
- Original Message - From: "Laurie Harper" <[EMAIL PROTECTED]>
To:
Sent: Saturday, October 29, 2005 1:51 AM
Subject: Re: Struts Validation Rule for Single Java Bean form-property
Hmm, I'm not sure how to specify the valid
8) 467 448
- Original Message -
From: "Laurie Harper" <[EMAIL PROTECTED]>
To:
Sent: Saturday, October 29, 2005 1:51 AM
Subject: Re: Struts Validation Rule for Single Java Bean form-property
Hmm, I'm not sure how to specify the validation rules with that
configuration; you
Hmm, I'm not sure how to specify the validation rules with that
configuration; you could try with depends="...
L.
Yujun Liang wrote:
Hello,
I define a single Java Bean Form Bean, do you know how to define the validation
rule? Thanks.
Regards
Yujun Liang
[EMAIL PROTECTED]
(0408) 467 448
1.
Joe Germuska Germuska.com> writes:
>
> At 12:14 PM -0700 7/14/05, Jay Burgess wrote:
> >Yes. It's because the leading zero is saying the numbers are
> >"octal", so 01-07
> >are valid octals, 08-09 are invalid octals, and 10-12 are valid octals.
>
> Jay's exactly right here. Your options:
>
At 12:14 PM -0700 7/14/05, Jay Burgess wrote:
Yes. It's because the leading zero is saying the numbers are
"octal", so 01-07
are valid octals, 08-09 are invalid octals, and 10-12 are valid octals.
Jay's exactly right here. Your options:
(1) hack the Javascript validation; commons-validator
Yes. It's because the leading zero is saying the numbers are "octal", so 01-07
are valid octals, 08-09 are invalid octals, and 10-12 are valid octals.
Jat
| Jay Burgess [Vertical Technology Group]
| "Essential Technology Links via RSS"
| http://www.vtgroup.com/
-Original Message-
F
Some clarification to my previous post:
if I add in the missing required field headWeight,
then
the action gets called and everything's fine.
otherwise, it would not even construct the action, it
happened before action gets constructed and called..
If a field is missing, shouldn't it just populate
Thanks, pedro
Couldnt resolve this one! upgraded to struts 1.2.4 and used a reqular
expression to validate instead.
Not quite the method i wanted to take but one which resolved the issue.
Thanks for your contribution
Andy
Pedro Salgado wrote:
Have you checked if you aren't duplicating configurat
Ashish,
I think you want to change your to include a bundle="approvals"
and resource="true" to use the key name dapproval.006 from the "approvals"
message bundle. See the javadoc for the commons validator at:
http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/valid
ator/Arg.
Have you checked if you aren't duplicating configurations on more than 1
file? (configFile1, ..., configFileN... N replaces configurations that are
also present (duplicate) in 1).
Are you working with modules?
Is the forward pointing to a correct action? (try putting validate =
false... and
Rick,
I would suggest having that page submit to another action path that maps
to the same Action and Form you need, but with the validate option set
to false. This is the tactic that I normally use. It allows you to
keep your code base intact, but submit to a customized path.
Michael
-Ori
"Adams, Richard K" <[EMAIL PROTECTED]> wrote on 05/18/2004 08:34:16
AM:
> I am running Struts 1.1 on Tomcat 4.1.24. How can I use the
> validator to use just the current page, and not all pages <= current
> page. I am using Tiles with a tab structure so each Tile is it's
> own page number. W
I did do something along the lines of using patterns and posted a patch, but
it had limitations and didn't go anywhere:
http://issues.apache.org/bugzilla/show_bug.cgi?id=26151
I would like to revisit it at some point, but in the mean time I used a
regexp validator instead:
integer_com
58 matches
Mail list logo