Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Paul Benedict
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Paul Benedict
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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:

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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

Re: problem with regex validator

2013-03-19 Thread Dave Newton
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

Re: problem with regex validator

2013-03-19 Thread Lukasz Lenart
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,

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
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

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
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

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
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

Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
*) 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

does struts 2.3 support mask validator?

2013-03-18 Thread Muralidhar Yaragalla
hi I have been searching on net for mask validator examples but could not found any for 2.3. -- Thanks And Regards, *Muralidhar Yaragalla. *

Re: does struts 2.3 support mask validator?

2013-03-18 Thread Lukasz Lenart
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

Re: does struts 2.3 support mask validator?

2013-03-18 Thread Dave Newton
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

Re: does struts 2.3 support mask validator?

2013-03-18 Thread Muralidhar Yaragalla
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

Re: does struts 2.3 support mask validator?

2013-03-18 Thread Dave Newton
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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-20 Thread Lukasz Lenart
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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-19 Thread Christopher Schultz
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

[S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Christopher Schultz
-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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Christopher Schultz
-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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Lukasz Lenart
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]

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Christopher Schultz
Ł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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Lukasz Lenart
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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Christopher Schultz
-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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Christopher Schultz
-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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Christopher Schultz
Ł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

Re: [S1] Validator does not respect locale when validating double value?

2013-01-18 Thread Lukasz Lenart
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/

Could somebody please confirm the bundle attribute issue is fixed in Commons Validator 1.3.0?

2012-03-05 Thread joann luo
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

Re: using xwork validator programatically?

2011-12-01 Thread Josep García
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

Re: using xwork validator programatically?

2011-12-01 Thread Łukasz Lenart
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

Re: using xwork validator programatically?

2011-12-01 Thread Josep García
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

Re: using xwork validator programatically?

2011-12-01 Thread Josep García
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

Re: using xwork validator programatically?

2011-11-30 Thread Josep García
(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

Re: using xwork validator programatically?

2011-11-30 Thread Łukasz Lenart
));     }     } 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

Re: using xwork validator programatically?

2011-11-30 Thread Łukasz Lenart
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

Re: using xwork validator programatically?

2011-11-28 Thread Josep García
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

Re: using xwork validator programatically?

2011-11-28 Thread Łukasz Lenart
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

Re: using xwork validator programatically?

2011-11-18 Thread Łukasz Lenart
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

using xwork validator programatically?

2011-11-16 Thread Josep García
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

Struts Validator Framework: client-side validation problem

2011-09-02 Thread RajasekharReddy
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

Re: Struts Validator Framework: client-side validation problem

2011-09-02 Thread Dave Newton
-- 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

Re: Struts Validator Framework: client-side validation problem

2011-09-02 Thread Brian Thompson
/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

Re: [S1] Validator configuration error [bump]

2011-08-08 Thread Christopher Schultz
-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

Re: [S1] Validator configuration error [bump]

2011-08-03 Thread Christopher Schultz
-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

Re: [S1] Validator configuration error [bump]

2011-07-19 Thread Christopher Schultz
-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

Re: [S1] Validator configuration error [bump]

2011-07-19 Thread Dave Newton
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

[S1] Validator configuration error

2011-06-30 Thread Christopher Schultz
-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

Struts 1.2.4 validator framework.

2011-06-27 Thread Maithily
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

Re: Struts 1.2.4 validator framework.

2011-06-27 Thread Dave Newton
{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 -

Re: Struts 1.2.4 validator framework.

2011-06-27 Thread Maithily
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,

Re: Struts 1.2.4 validator framework.

2011-06-27 Thread Dave Newton
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

Re: Struts 1.2.4 validator framework.

2011-06-27 Thread Maithily
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

Re: Struts 1.2.4 validator framework.

2011-06-27 Thread Dave Newton
=${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

Re: Struts 1.2.4 validator framework.

2011-06-27 Thread Maithily
, 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

Re: Struts 1.2.4 validator framework.

2011-06-27 Thread Dave Newton
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

common validator combine constants / constant-name

2011-04-20 Thread userxxx
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

Validate method call validator

2011-03-14 Thread Mohamed SIDI
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 --

Re: Validate method call validator

2011-03-14 Thread Dave Newton
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

how to access spring beans from inside a custom validator

2010-11-01 Thread Jake Vang
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

Re: how to access spring beans from inside a custom validator

2010-11-01 Thread Eduard Neuwirt
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

Re: how to access spring beans from inside a custom validator

2010-11-01 Thread Jake Vang
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

Re: how to access spring beans from inside a custom validator

2010-11-01 Thread Eduard Neuwirt
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

Problem with required validator

2010-10-05 Thread Darren Karstens
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

Re: Problem with required validator

2010-10-05 Thread Dave Newton
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

Re: Problem with required validator

2010-10-05 Thread Raymond He
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

Re: Problem with required validator

2010-10-05 Thread Darren Karstens
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

Re: Struts 2 field validator thread safety

2010-07-30 Thread Wes Wannemacher
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

Re: Struts 2 field validator thread safety

2010-07-17 Thread Marshall Gunter
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

Struts 2 field validator thread safety

2010-07-15 Thread Marshall Gunter
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

Re: Struts 2 field validator thread safety

2010-07-15 Thread Christopher Schultz
-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

Struts2+Hinerneta Validator+Spring

2010-07-10 Thread Alireza Fattahi
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

RE: Struts2+Hinerneta Validator+Spring

2010-07-10 Thread Martin Gainty
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

fieldexpression validator not working

2010-06-28 Thread Jake Vang
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

Re: fieldexpression validator not working

2010-06-28 Thread Jake Vang
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

int validator stopped working after upgrade to 2.1.8 from 2.1.6

2009-12-27 Thread Parm Lehal
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

Error Messges(Field Validator Type = regex)

2009-11-25 Thread taj uddin
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

Visitor validator problem

2009-10-19 Thread Jose Fco . Irles Durá
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

Re: Field-Validator and BigDecimal

2009-09-21 Thread strutstwouser
, 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

Field-Validator and BigDecimal

2009-09-17 Thread Robin Mannering
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

[S2] Parametrized range validator for min and max values.

2009-09-16 Thread Ahmed ALAMI
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

Re: [s2] Custom field validator with params containing OGNL expression

2009-07-09 Thread Lukasz Lenart
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

[s2] Custom field validator with params containing OGNL expression

2009-07-07 Thread Cristian Peraferrer
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

Validator

2009-07-02 Thread Odelya YomTov
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,

validator issue in Struts 2.16

2009-06-16 Thread Yanto
? 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

Re: passing form parameters to a custom validator

2009-05-21 Thread manub
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

Re: passing form parameters to a custom validator

2009-05-21 Thread Lukasz Lenart
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

Re: passing form parameters to a custom validator

2009-05-21 Thread stanlick
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

<    1   2   3   4   5   6   7   8   9   10   >