validators are working fine except regex.
On Wed, Mar 20, 2013 at 2:21 AM, Paul Benedict pbened...@apache.org
wrote:
When the validator isn't working, it could signify none of your
validation
is working. Have you tried the required-string validator or anything
else
is working
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
I have added the following to log4j
log4j.logger.com.opensymphony.xwork2.validator.validators=debug
But it doe not print anything on console. The logger was set for console
and for file.(both appenders)
Log4j is supported throughout
I have modified the Showcase app and defined regexp as ![CDATA[
[^]+ ]] and everything works as expected.
But I noticed one thing, I have renamed expression param into regex in
2.3.12, the question is which version do you use?
http://struts.apache.org/development/2.x/docs/regex-validator.html
As far as i remember commons logging is one of the implementation of log4j.
but xworks classes does not use log4j. I am saying this because i have used
the log that comes from the super class which is a xworks class and that is
not of log4j.
On Wed, Mar 20, 2013 at 2:53 AM, Lukasz Lenart
What input value are you testing against the regex?
On Tue, Mar 19, 2013 at 4:28 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
As far as i remember commons logging is one of the implementation of log4j.
but xworks classes does not use log4j. I am saying this because i have used
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
As far as i remember commons logging is one of the implementation of log4j.
but xworks classes does not use log4j. I am saying this because i have used
the log that comes from the super class which is a xworks class and that is
not of
something like apple (without quotes).
On Wed, Mar 20, 2013 at 3:02 AM, Paul Benedict pbened...@apache.org wrote:
What input value are you testing against the regex?
On Tue, Mar 19, 2013 at 4:28 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
As far as i remember commons
Did you add the ^ and $ like I suggested?
On Tue, Mar 19, 2013 at 4:34 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
something like apple (without quotes).
On Wed, Mar 20, 2013 at 3:02 AM, Paul Benedict pbened...@apache.org
wrote:
What input value are you testing against the
2013/3/19 Paul Benedict pbened...@apache.org:
Did you add the ^ and $ like I suggested?
Is really not needed, I have tested with the Showcase app, just modify
FieldValidatorsExampleAction-submitFieldValidatorsExamples-validation.xml
and you can see the desired behaviour
Regards
--
Łukasz
+ 48
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
something like apple (without quotes).
Which version of Struts do you use?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
-
To unsubscribe, e-mail:
sorry for my comment. what you said is right. Thank you for that info.
On Wed, Mar 20, 2013 at 3:04 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
As far as i remember commons logging is one of the implementation of
log4j.
but
i use struts 2.3.12
On Wed, Mar 20, 2013 at 3:15 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
something like apple (without quotes).
Which version of Struts do you use?
Regards
--
Łukasz
+ 48 606 323 122
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
i use struts 2.3.12
Could you show how did toy define regex validator? As I said,
expression param name was changed to regex
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl
I am not sure who is toy.
On Wed, Mar 20, 2013 at 3:44 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
i use struts 2.3.12
Could you show how did toy define regex validator? As I said,
expression param name was changed to regex
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
I am not sure who is toy.
*you
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional
are u asking me to show how i have written custom validator for regex?
On Wed, Mar 20, 2013 at 3:50 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
I am not sure who is toy.
*you
Regards
--
Łukasz
+ 48 606 323 122 http
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
are u asking me to show how i have written custom validator for regex?
Nope, how did you configure built-in regex validator, the *-validation.xml file
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl
This is fun.
On Tue, Mar 19, 2013 at 6:29 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
are u asking me to show how i have written custom validator for regex?
Nope, how did you configure built-in regex validator
2013/3/19 Dave Newton davelnew...@gmail.com:
This is fun.
don't push ;-)
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands,
This is how i did
!DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator 1.0.2//EN
http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd;
validators
field name=votingTopic.votingTopic
field-validator type=regex
param name=expression![CDATA[[^]+]]/param
not work.
any way i am fed up understanding that validator so i have written my own
and it works fine. Thanks all of you for helping me.
On Wed, Mar 20, 2013 at 12:30 AM, Chris Pratt thechrispr...@gmail.com
wrote:
I'm pretty sure you can't use CDATA inside an attribute value. Have you
Try:
param name=regex[^lt;gt;]+/param
(*Chris*)
On Tue, Mar 19, 2013 at 3:50 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
This is how i did
!DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator 1.0.2//EN
http://struts.apache.org/dtds/xwork-validator-1.0.2
Yes I did. Not only this to that matter a simple reg which is shown in docs
also did not work. so i concluded that validator itself is not working. I
dont know why?
On Wed, Mar 20, 2013 at 4:23 AM, Chris Pratt thechrispr...@gmail.comwrote:
Muralindhar,
I just realized I forgot the + from
*)
On Tue, Mar 19, 2013 at 3:50 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
This is how i did
!DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator
1.0.2//EN
http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd;
validators
field name=votingTopic.votingTopic
hi I have been searching on net for mask validator examples but could not
found any for 2.3.
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
2013/3/18 Muralidhar Yaragalla java.yaraga...@gmail.com:
hi I have been searching on net for mask validator examples but could not
found any for 2.3.
Mask validator? What you mean by that?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl
The regex validator?
On Mon, Mar 18, 2013 at 4:44 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
The following is the example for mask validator in struts 1
field property=phoneNumber depends=required,mask
msg name=mask key=userForm.phoneNumber.mask /
arg key
I don't see regex validator in validators.xml so do we have to get it from
somewhere?
On Tue, Mar 19, 2013 at 2:17 AM, Dave Newton davelnew...@gmail.com wrote:
The regex validator?
On Mon, Mar 18, 2013 at 4:44 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
The following
http://struts.apache.org/development/2.x/docs/validation.html#Validation-BundledValidators
On Mon, Mar 18, 2013 at 4:57 PM, Muralidhar Yaragalla
java.yaraga...@gmail.com wrote:
I don't see regex validator in validators.xml so do we have to get it from
somewhere?
On Tue, Mar 19, 2013 at 2
2013/1/19 Christopher Schultz ch...@christopherschultz.net:
So, is it worth filing a bug and attaching a patch, or should I just
write my own validator and use that for my own uses?
Fill a bug and attach patch and write your own custom validator as well :-)
Regards
--
Łukasz
+ 48 606 323 122
this.
It isn't actively developed any more, that's the problem :-)
So, is it worth filing a bug and attaching a patch, or should I just
write my own validator and use that for my own uses?
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
All,
I'm running Struts 1.3.10 (with commons-validator 1.3.1), and I'm
trying to validate (and subsequently parse) a floating-point value as
a double.
My validator configuration looks like this (I apologize for it's
potential unreadability
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
All,
On 1/18/13 1:02 PM, Christopher Schultz wrote:
Before I go digging-through the code Struts/commons-validator to
find out exactly what might be wrong, can anyone give me any
suggestions at to what I might be missing?
Actually, it didn't
2013/1/18 Christopher Schultz ch...@christopherschultz.net:
The method validateDouble() totally ignores the user's Locale and
calls commons-validator's formatDouble(String) method instead of the
formatDouble(String,Locale) method.
The same seems to be true for all the validate[NumberType]
Łucaz,
On Jan 18, 2013, at 16:00, Lukasz Lenart lukaszlen...@apache.org wrote:
2013/1/18 Christopher Schultz ch...@christopherschultz.net:
The method validateDouble() totally ignores the user's Locale and
calls commons-validator's formatDouble(String) method instead of the
2013/1/18 Christopher Schultz ch...@christopherschultz.net:
Honestly, I'm shocked that struts 1, which is at least 10 years old, still
has a glaring internationalization bug like this.
It isn't actively developed any more, that's the problem :-)
Regards
--
Łukasz
+ 48 606 323 122
-chris
--
Christopher Schultz
Chief Technology Officer, Total Child Health Inc.
Technical Director, Center for Promotion of Child Development through Primary
Care
tel: +1.410.807.4500 x20
tel: +1.888.4CHADIS (+1.888.424.2347)
email: cschu...@chadis.com
On Jan 18, 2013, at 16:38, Lukasz
-chris
--
Christopher Schultz
Chief Technology Officer, Total Child Health Inc.
Technical Director, Center for Promotion of Child Development through Primary
Care
tel: +1.410.807.4500 x20
tel: +1.888.4CHADIS (+1.888.424.2347)
email: cschu...@chadis.com
On Jan 18, 2013, at 16:38, Lukasz
Łucaz,
On Jan 18, 2013, at 16:38, Lukasz Lenart lukaszlen...@apache.org wrote:
2013/1/18 Christopher Schultz ch...@christopherschultz.net:
Honestly, I'm shocked that struts 1, which is at least 10 years old, still
has a glaring internationalization bug like this.
It isn't actively
2013/1/18 Christopher Schultz ch...@christopherschultz.net:
I've got an old web app that has used S1 for years, so that's why I'm using
it. Don't worry, I'm not trying to launch a brand-new project using struts
one.
:D
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Hello,
Thanks so much for the responses to my previous question in this thread:
http://struts.1045723.n5.nabble.com/Validation-doesn-t-honor-the-bundle-attribute-in-http-jakarta-apache-org-commons-dtds-validator-1-3-d-td5528087.html
The customer requires us to add the customized error messages
xml tree), I've also had to code my own
field validator, because my action does not have getter/setter for the
dynamic fields.
In my derived XmlRequiredFieldValidator, I reimplement getFieldValue:
protected Object getFieldValue(String name, Object object) throws
ValidationException
on freemarker's
ability to render input fields from xml tree), I've also had to code my own
field validator, because my action does not have getter/setter for the
dynamic fields.
In my derived XmlRequiredFieldValidator, I reimplement getFieldValue:
protected Object getFieldValue(String name
enclose a patch, with changes relative to xwork-core-2.1.6.
In order to validate dynamic form input fields (based on freemarker's
ability to render input fields from xml tree), I've also had to code my
own
field validator, because my action does not have getter/setter for the
dynamic
Regarding:
2011/12/1 Josep García jgar...@isigma.es
In order to validate dynamic form input fields (based on freemarker's
ability to render input fields from xml tree), I've also had to code my own
field validator, because my action does not have getter/setter for the
dynamic fields
(validatorKey, buildValidatorConfigs(clazz,
context, false, null));
}
// get the set of validator configs
ListValidatorConfig cfgs = validatorCache.get(validatorKey);
and if reload is false, it will not find the file
MyAction-my-validation-validation.xml: the validatorKey is based
));
}
} else {
validatorCache.put(validatorKey, buildValidatorConfigs(clazz,
context, false, null));
}
// get the set of validator configs
ListValidatorConfig cfgs = validatorCache.get(validatorKey);
and if reload is false, it will not find the file
2011/11/30 Josep García jgar...@isigma.es
This way, it works, but the downside: 149 line source file to work around
the problem.
Could you prepare a patch and label it with 3.x ? Maybe we'll be able to
refactor the manager with your changes
Kind regards
--
Łukasz
+ 48 606 323 122
the validation process, the validator calls OgnlContext.get(Object
key) to retrieve the value to validate agains a validation rule, but fails
to retrieve it.
While debugging, I can see the params are there in a map entry: Key:
com.opensymphony.xwork2.ActionContext.parameters, and in value: all my
form params
rules.
So far, so good.
However, my form post the user input as form parameters of the type:
dom.myparam1, dom.myparam2, etc.
Within the validation process, the validator calls OgnlContext.get(Object
key) to retrieve the value to validate agains a validation rule, but fails
to retrieve
You can try to obtain ActionValidatorManager instance (@Inject in to
an action) and try to use one of its methods.
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/
2011/11/16 Josep García jgar...@isigma.es:
Is there any
Is there any documentation on how to call xwork validation programatically?
The context: I have a dynamic form, which is a freemarker template, which
can have any fields that are then saved as xml in my Struts action.
I would like to have the possibility to call validation with a specific
to nbsp; html:link
href=SignUp.jspSignUp/html:link /strong/embr
/center
/body
/html:html
--
View this message in context:
http://struts.1045723.n5.nabble.com/Struts-Validator-Framework-client-side-validation-problem-with-submitting-buttons-tp3481073p4761399.html
Sent from the Struts - User mailing
--
View this message in context:
http://struts.1045723.n5.nabble.com/Struts-Validator-Framework-client-side-validation-problem-with-submitting-buttons-tp3481073p4761399.html
Sent from the Struts - User mailing list archive at Nabble.com
/html:link /strong/embr
/center
/body
/html:html
--
View this message in context:
http://struts.1045723.n5.nabble.com/Struts-Validator-Framework-client-side-validation-problem-with-submitting-buttons-tp3481073p4761399.html
Sent from the Struts - User mailing list archive at Nabble.com
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
On 8/3/2011 12:57 PM, Christopher Schultz wrote:
I can always just patch my local struts-config.dtd file to get rid
of the error. I'm happy to supply a (nearly trivial) patch to the
1.x branch just in case there is another release.
This is
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dave,
On 7/19/2011 5:59 PM, Dave Newton wrote:
If it works, I wouldn't worry about it.
I'm not sure if anybody is planning any further 1.x releases, to be
honest; maybe if a patch is filed against the ticket someone would
apply it, but I'm
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
Does anyone have any ideas about my post?
- -chris
On 6/30/2011 11:02 PM, Christopher Schultz wrote:
All,
struts-1.3.8 commons-validator-1.3.1
I recently started using a dynamic form form-property attribute
called reset. It's
Schultz
ch...@christopherschultz.net wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
Does anyone have any ideas about my post?
- -chris
On 6/30/2011 11:02 PM, Christopher Schultz wrote:
All,
struts-1.3.8 commons-validator-1.3.1
I recently started using a dynamic form form
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
struts-1.3.8
commons-validator-1.3.1
I recently started using a dynamic form form-property attribute called
reset. It's documented to allow you to use either true or false or
any combination of comma-separated HTTP methods that will trigger
Hi,
I am new to this mailing list and am facing a problem using the minlength
field validation provided by the Struts Validation Framework.
Struts version - 1.2.4
Application Server - Apache Tomcat (5.5)
I have configured the following in my validation.xml file -
field property=password
{1} like the default message.
Dave
On Jun 27, 2011 3:14 AM, Maithily maithily.koh...@gmail.com wrote:
Hi,
I am new to this mailing list and am facing a problem using the
minlength
field validation provided by the Struts Validation Framework.
Struts version - 1.2.4
Application Server -
Thanks for the reply Dave.
The default error message configured as follows
errors.minlength={0} can not be less than {1} characters.
Regards,
Maithily
On Mon, Jun 27, 2011 at 4:30 PM, Dave Newton davelnew...@gmail.com wrote:
{1} like the default message.
Dave
On Jun 27, 2011 3:14 AM,
Oh, you're saying that the error message *renders* as ... less than
${var.minlength} characters?
What happens when you declare the var as ${var:minlength} as in the docs?
Dave
On Mon, Jun 27, 2011 at 8:17 AM, Maithily maithily.koh...@gmail.com wrote:
Thanks for the reply Dave.
The default
Yeah, it renders as you have said.
I have declared the var as per the struts validator documents.
field property=password depends=required,minlength
arg position=0 key=LoginForm.password/
arg position=1 name=minlength key=${var.minlength}
resource=false
=${var:minlength} resource=false/
varvar-nameminlength/var-namevar-value3/var-value/var
/field
So, it's a colon there.
Dave
On Mon, Jun 27, 2011 at 8:31 AM, Maithily maithily.koh...@gmail.com wrote:
Yeah, it renders as you have said.
I have declared the var as per the struts validator
, it's a colon there.
Dave
On Mon, Jun 27, 2011 at 8:31 AM, Maithily maithily.koh...@gmail.com
wrote:
Yeah, it renders as you have said.
I have declared the var as per the struts validator documents.
field property=password depends=required,minlength
arg position=0 key
the struts validator documents.
field property=password depends=required,minlength
arg position=0 key=LoginForm.password/
arg position=1 name=minlength key=${var.minlength}
resource=false/
var
var-nameminlength/var-name
Hello,
I want to to mix constants in the common-validator
I Use struts 1.2.9 and common-validator 1.3.1 on weblogic 10.3.2.0
Here is a simple example:
validation.xmlfinalpos...@googlemail.com
[...]
constant
constant-nameK_alpha/constant-name
constant-value[A-Z]/constant-value
Hi all,
I wd like to know if in my validate method, I can call et validator rule in
my ActionName-validation.xml.
Some things like :
.
.
.
validate (){
.
if(condition)
call a validator rule in ActionName-validation.xml
}
Best wishes
--
On Mon, Mar 14, 2011 at 10:21 AM, Mohamed SIDI mhm.s...@gmail.com wrote:
I wd like to know if in my validate method, I can call et validator rule in
my ActionName-validation.xml.
Some things like :
.
validate (){
.
if(condition)
call a validator rule in ActionName-validation.xml
i have a custom field validator that extends FieldValidatorSupport.
inside this class, i need to access some beans as defined in
applicationContext.xml by Spring. how do i access the spring managed
beans? any help is appreciated
Hello Jake,
It is simple.
Use struts/spring plug in.
Declare your bean within your validator and let spring inject your
validator.
That's all
Regards
Eduard
P.S.: Do not forget to define the corresponding setter method for injection
Am 01.11.2010 08:37, schrieb Jake Vang:
i have a custom
org.springframework.web.context.ContextLoaderListener defined in
web.xml.
Thanks,
On Mon, Nov 1, 2010 at 4:17 AM, Eduard Neuwirt
eduard.neuw...@googlemail.com wrote:
Hello Jake,
It is simple.
Use struts/spring plug in.
Declare your bean within your validator and let spring inject your
validator.
That's all
Regards
Eduard
P.S.: Do
Neuwirt
eduard.neuw...@googlemail.com wrote:
Hello Jake,
It is simple.
Use struts/spring plug in.
Declare your bean within your validator and let spring inject your
validator.
That's all
Regards
Eduard
P.S.: Do not forget to define the corresponding setter method for injection
Am 01.11.2010 08:37
Hi,
I have a xml validator for my user login action which requires values
for both the userName and password fields. However when submit the
form with these fields populated I still get the same Username is
required and Password is required messages. Am I right in thinking
that the required
Without knowing specifically how the validator is configured (where is the
validation file when it's deployed, how the action is configured, the form
itself, etc.) it's tough to give much beyond make sure it's configured
correctly.
Dave
On Tue, Oct 5, 2010 at 7:52 AM, Darren Karstens darrenkarst
You can debug your app,and step in the required validator
class'validation method. And check whether the value is populated .
Maybe it'snull .
2010/10/5, Darren Karstens darrenkarst...@gmail.com:
Hi,
I have a xml validator for my user login action which requires values
for both the userName
Thanks for the replies. I figured out what the problem was. My model
in the action class is a member variable called user, so I needed to
change the name of my form fields and validator fields to
user.userName instead of just userName.
2010/10/5 Raymond He raymond.kk...@gmail.com:
You can debug
I would say that you probably should write the validator to be
thread-safe (just to be sure). But, that being said, from a quick look
at the validation framework (check classes like
DefaultValidationFactory, ValidationInterceptor, etc. inside of
xwork), it looks like xwork caches the validator
your own,
or are you critiquing the existing validator implementations?
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkw/qMgACgkQ9CaO5/Lv0PCUrACgstaFyPiVsxZJ8iswTE4zmn0k
Do Struts 2 field validators need to be thread safe?
--
Marshall Gunter
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Marshall,
On 7/15/2010 9:27 AM, Marshall Gunter wrote:
Do Struts 2 field validators need to be thread safe?
That depends on what you want to do with them. Are you writing your own,
or are you critiquing the existing validator implementations
Hibernate Plugin, Hibernate Validation feature only.
2- If not, are there any other frameworks which helps us with that.
3- I found a method described in
http://vamshisomanchi.wordpress.com/2008/07/26/struts-20-hibernate-validator/
any other simpler way
~Regards,
~~Alireza Fattahi
instead.
defaultStackHibernateStrutsValidation: Struts2 defaultStack + plugin
basicStackHibernate.
The Hibernate Validator on google has the necessary information you need with
working configurations and sample code
http://code.google.com/p/full-hibernate-plugin-for-struts2/wiki
i have a User class with two fields, password and confirmPassword. on
a web form, upon post, i am trying to see if they match using the
fieldexpression validator. however, no matter what i try, i keep
getting the message that they don't match. in the Tomcat console, i
can see this message: Got
the
fieldexpression validator. however, no matter what i try, i keep
getting the message that they don't match. in the Tomcat console, i
can see this message: Got result of null when trying to get Boolean.
my ActionClass-alias-validation.xml has the following defined. no
matter what i try
Hello my int validator stopped working after upgrade to 2.1.8 from
2.1.6. Can someone please, provide some insight?
My validators are defined like this and they used to work fine before.
Now string validators are working but not the int ones
Hi Friends,
I am using struts 2.1.6. Facing problem with error messages.
When i use 'regex' validator in validation.xml file than
1. when i clicked on submit button for the first time.
It is showing error messages like
Customer name is required
Hi, i'm developing a cms application with struts2 (2.1.8), spring as
object factory and jpa for persistence.
I have this struts.xml
http://pastebin.com/f33635250
this BaseCrudAction
http://pastebin.com/f7abb39b6
and its BaseCrudAction-validation.xml
http://pastebin.com/f3eade052
this example
, seems like the requiredstring
fails since it encounters a non-String value
if (!(value instanceof String)) {
addFieldError(fieldName, object);
Can you try replacing field-validator type=requiredstring with
field-validator type=required
Also, you may want to put short-circuit=true
rules?
Thanks
Robin
field name=agencyCommRate
field-validator type=requiredstring
param name=trimtrue/param
message
key=form.createShopForm.validationMsg.agencyCommRateRequired![CDATA[
error msg 1 ]]/message
/field-validator
field
Hi everybody,
Is there a way to configure a struts2 validator like this :
(The min and max have a parametrized value from the value stack)
field-validator type=date
param name=min01/01/${date}/param
param name=max31/12/${date}/param
messageSet date between ${min} et ${max}/message
2009/7/7 Cristian Peraferrer corellia...@gmail.com:
field-validator type=usernameavailable
param name=userId${enterprise.enterpriseId}/param
messageThis username is already taken./message
/field-validator
Do you have a getter called getEnteriprise() on an action?
Regards
Hi!
I have implemented a field validator that validates the username is
not already in the database (to avoid overwriting).
But in the validator call (or configuration), I need to pass a
parameter that is another field in the form. Here my code:
field-validator type=usernameavailable
param
Hi!
I get exception when i submit a form extends ValidatorForm.
the error is really funny:
SEVERE:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages,
?
Code same:
QuizAction-validation.xml:
?xml version=*1.0* encoding=*UTF-8*?
!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork Validator 1.0.2//EN
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
validators
field name=*name
I think that this may work for the expression validator because you are
supplying an expression.
Maybe I need to use an expression too, but I don't know how to evaluate it
within my Java class for Validator.
Lukasz Lenart wrote:
2009/5/20 manub e.bla...@reply.it:
I've written a custom
2009/5/21 manub e.bla...@reply.it:
I think that this may work for the expression validator because you are
supplying an expression.
I've been thinking about param/ tag, with it you can set any field
in your validator and it can be an OGNL expression.
Regards
--
Lukasz
http
Rather than pass this, that and the other parameter(s) to your validator,
why not just retrieve what you need from inside the validator? You have the
ActionInvocation passed to your doIntercept(...), which contains the
ValueStack containing your objects.
Peace,
Scott
On Tue, May 19, 2009 at 7
101 - 200 of 1759 matches
Mail list logo