Re: passing form parameters to a custom validator

2009-05-21 Thread manub
Did it this way. Passed field names via the tag, then obtained values inside the validator class using getFieldValue(fieldName, object). Thank you for suggestions. stanlick wrote: Rather than pass this, that and the other parameter(s) to your validator, why not just retrieve what you need

Re: passing form parameters to a custom validator

2009-05-20 Thread Lukasz Lenart
2009/5/19 manub e.bla...@reply.it: I'm trying to write a custom field validator which needs other fields to validate the field I need to validate. How can I pass field values (and not static params) to a field validator in the validation xml? I'm using Struts 2.1.6. Did you try

Re: passing form parameters to a custom validator

2009-05-20 Thread manub
Yes, I did. But in the action the string takes the value ${field} and not the field value. Lukasz Lenart wrote: 2009/5/19 manub e.bla...@reply.it: I'm trying to write a custom field validator which needs other fields to validate the field I need to validate. How can I pass field values

Re: passing form parameters to a custom validator

2009-05-20 Thread Lukasz Lenart
2009/5/20 manub e.bla...@reply.it: Yes, I did. But in the action the string takes the value ${field} and not the field value. Frankly, I don't understand, are you trying to pass data from validator xml configuration to action? Regards -- Lukasz http://www.lenart.org.pl

Re: passing form parameters to a custom validator

2009-05-20 Thread manub
Lukasz Lenart wrote: Frankly, I don't understand, are you trying to pass data from validator xml configuration to action? I've written a custom field validator, which needs other field values to validate his field. I need a way to pass that values to that field validator. -- View

Re: passing form parameters to a custom validator

2009-05-20 Thread Lukasz Lenart
2009/5/20 manub e.bla...@reply.it: I've written a custom field validator, which needs other field values to validate his field. I need a way to pass that values to that field validator. Did you try to use param tag as below? field name=employee.employeeType field-validator type=expression

passing form parameters to a custom validator

2009-05-19 Thread manub
Hi all, I'm trying to write a custom field validator which needs other fields to validate the field I need to validate. How can I pass field values (and not static params) to a field validator in the validation xml? I'm using Struts 2.1.6. Thank you. -- View this message in context: http

Re: Trim for regex validator is not working

2009-05-18 Thread Siddiq Syed
Thanks Dave, In order to dispaly the error message if we give the whitespace infront of the number , we need to set trim=false. I sloved this problem by setting trim=false for regex validation. Below is the snippet. Thanks a lot for you input. field name=caseNumber field-validator

Trim for regex validator is not working

2009-05-13 Thread Siddiq Syed
Hi all, Do anybody have an idea why this is not working. There is validation for a numeric field which is a string in the action , The validation is through regular expression as show below. field name=caseNumber field-validator type=requiredstring messagePlease enter

Re: Trim for regex validator is not working

2009-05-13 Thread Dave Newton
Siddiq Syed wrote: Do anybody have an idea why this is not working. There is validation for a numeric field which is a string in the action , The validation is through regular expression as show below. field name=caseNumber field-validator type=requiredstring

Re: Trim for regex validator is not working

2009-05-13 Thread Siddiq Syed
. There is validation for a numeric field which is a string in the action , The validation is through regular expression as show below. field name=caseNumber field-validator type=requiredstring messagePlease enter a case number/message /field-validator field-validator

Re: Trim for regex validator is not working

2009-05-13 Thread Dave Newton
Siddiq Syed wrote: I am searching for the regular expression, which ignore white spaces but no sucess so far. Any idea ? ... According to [1] (which was the top hit when I searched for java +regular expression), \s matches any whitespace character. * means 0 or more occurrences. So \s*

URGENT : Unable to retain request Attributes after the validator framework thraws an Error...

2009-04-12 Thread JigarGohil
for this. Thanx in advance... Jigar -- View this message in context: http://www.nabble.com/URGENT-%3A--Unable-to-retain-request-Attributes-after-the-validator-framework-thraws-an-Error...-tp23011346p23011346.html Sent from the Struts - User mailing list archive at Nabble.com

Struts validator nested vector validation

2009-01-27 Thread Eugene Ezekiel
Hi All, I was reading the Struts validator API and i tried all kinds of forums and googling for days to no avail. How do I use the validator for nested vector validation. Here's my attempt but it doesn't seem to work. field indexedListProperty

expression type validator and getText()

2009-01-09 Thread stanlick
I need to fetch a locale specific string for an evaluation and cannot get the syntax worked out: field name=title field-validator type=expression param name=expression !title.toUpperCase().equals( getText(titleMatch) ) /param

Using OGNL to set validator parameters

2008-12-17 Thread stanlick
Is there a way to avoid hard coding limits into a validator? Take for instance the IntRangeFieldValidator. It has a min and max property that are populated from the XML as per: field name=ageLimit field-validator type=int 0

expression validator NPE

2008-12-16 Thread stanlick
I have encountered a validation that seems to disrupt the S2 request life cycle. If I have the following validation and foo is not found on the stack, I do not get a result! validators field name=name field-validator type=expression foo.startsWith

How do i get a field value inside a custom Struts Validator, when the field’s type is FormFile?

2008-12-10 Thread Sergio del Amo Caballero
I am using struts 1.3.8 and I have a form field of type org.apache.struts.upload.FormFile. I would like to validate the field's size with a custom struts validator. To get the field's value, i have used for a text field the next code: String value = ValidatorUtils.getValueAsString(bean

Validator with datetimepicker

2008-12-01 Thread curu
startDate; public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } and the validation file part : field name=startDate field-validator type=required message key=required/ /field-validator

RE: Problem is using struts 1.2.9 validator

2008-11-27 Thread Rajil
find the location of error prone code in your JSP file. -Original Message- From: UITOT [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2008 2:52 PM To: user@struts.apache.org Subject: Problem is using struts 1.2.9 validator Hello Experts , I am facing one very

Problem is using struts 1.2.9 validator

2008-11-25 Thread UITOT
Hello Experts , I am facing one very strange problem in struts 1.2.9 validator. I have used validator in almost all JSPs of my project but it is giving error only for one particular JSP , rest are working fine. As soon as I add an entry for that jsp in validator.xml that form

Re: Problem is using struts 1.2.9 validator

2008-11-25 Thread Paul Benedict
What is the error? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Access to Session from Validator and/or TypeConverter?

2008-11-19 Thread David C. Hicks
Is there a way to get hold of the Session object from inside a Validator or TypeConverter? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Access to Session from Validator and/or TypeConverter?

2008-11-19 Thread Dave Newton
--- On Wed, 11/19/08, David C. Hicks wrote: Is there a way to get hold of the Session object from inside a Validator or TypeConverter? Why would you want to? That smells like an unnecessary dependency. Dave - To unsubscribe

Re: Access to Session from Validator and/or TypeConverter?

2008-11-19 Thread David C. Hicks
Should I take that as a no ? Dave Newton wrote: --- On Wed, 11/19/08, David C. Hicks wrote: Is there a way to get hold of the Session object from inside a Validator or TypeConverter? Why would you want to? That smells like an unnecessary dependency. Dave

Re: Access to Session from Validator and/or TypeConverter?

2008-11-19 Thread Musachy Barroso
of the Session object from inside a Validator or TypeConverter? Why would you want to? That smells like an unnecessary dependency. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Access to Session from Validator and/or TypeConverter?

2008-11-19 Thread David C. Hicks
] wrote: Should I take that as a no ? Dave Newton wrote: --- On Wed, 11/19/08, David C. Hicks wrote: Is there a way to get hold of the Session object from inside a Validator or TypeConverter? Why would you want to? That smells like an unnecessary dependency. Dave

Re: How to make validator framework call the input method

2008-10-15 Thread Lukasz Lenart
2008/10/14 Néstor Boscán [EMAIL PROTECTED]: I'm using the validator frame in Struts 2.0.11.2. When the validator framework fails I need to call the input method to load some combo data. But the validator framework automatically calls the input result. If I chain that input result

Re: How to make validator framework call the input method

2008-10-15 Thread Néstor Boscán
Boscán [EMAIL PROTECTED]: I'm using the validator frame in Struts 2.0.11.2. When the validator framework fails I need to call the input method to load some combo data. But the validator framework automatically calls the input result. If I chain that input result with the input method I

Re: How to make validator framework call the input method

2008-10-15 Thread Dave Newton
--- On Wed, 10/15/08, Néstor Boscán wrote: But the prepare method will be called if a validation error happens or not. If a validation error happens I want to load the combo data, but if not I don't need to load that data. You can also use prepareXxx, where Xxx is the method name. But if you

How to make validator framework call the input method

2008-10-14 Thread Néstor Boscán
Hi I'm using the validator frame in Struts 2.0.11.2. When the validator framework fails I need to call the input method to load some combo data. But the validator framework automatically calls the input result. If I chain that input result with the input method I loose the fieldErrors

Re: Credit card validator

2008-08-27 Thread David N. Arnold
Don't know if it helps you, but Hibernate Validator has a credit card validator. It will work with JPA providers other than just Hibernate. On Thu, Aug 21, 2008 at 10:39 AM, Gundersen, Richard [EMAIL PROTECTED] wrote: Cheers Dave I'll dig around and see if theres a good open source

RE: Credit card validator

2008-08-27 Thread Gundersen, Richard
: Wednesday, August 27, 2008 3:47 PM To: Struts Users Mailing List Subject: Re: Credit card validator Don't know if it helps you, but Hibernate Validator has a credit card validator. It will work with JPA providers other than just Hibernate. On Thu, Aug 21, 2008 at 10:39 AM, Gundersen, Richard [EMAIL

regex validator and BigDecimal

2008-08-25 Thread ndario
Hello, I am trying to enforce BigDecimal number format with regex validator but validation simply does nothing. If I apply the same validator to the String property, validator works but for some reason does not work with BigDecimal. I guess the reason is that validation is applied to converted

Re: regex validator and BigDecimal

2008-08-25 Thread ealden
format with regex validator but validation simply does nothing. If I apply the same validator to the String property, validator works but for some reason does not work with BigDecimal. I guess the reason is that validation is applied to converted BigDecimal object but not on the string which user

Re: regex validator and BigDecimal

2008-08-25 Thread Oleg Mikheev
ndario wrote: Is there any way to validate the string before conversion to BigDecimal? The right (and default) way of handling conversion errors is to use the Conversion Error Interceptor: http://struts.apache.org/2.x/docs/conversion-error-interceptor.html There is no converter for

Re: regex validator and BigDecimal

2008-08-25 Thread ndario
to give a warning that format is incorrect. I guess that cannot be done with regex validator and BigDecimal? -- View this message in context: http://www.nabble.com/regex-validator-and-BigDecimal-tp19142200p19145282.html Sent from the Struts - User mailing list archive at Nabble.com

Credit card validator

2008-08-21 Thread Gundersen, Richard
Sorry if I'm missing something obvious, but can someone tell me if there's a credit card validator in Struts 2? There's one in Struts 1, and in Struts 2 I found creditCard.js, which uses the Luhn algorithm, but I cant figure out a) how to use it or b) if there is a corresponding annotation

Re: Credit card validator

2008-08-21 Thread Dave Newton
--- On Thu, 8/21/08, Gundersen, Richard wrote: can someone tell me if there's a credit card validator in Struts 2? Not that I know of; the creditCard.js you're referring to is part of Dojo. Dave - To unsubscribe, e-mail

RE: Credit card validator

2008-08-21 Thread Gundersen, Richard
Manchester M2 3LS -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2008 3:17 PM To: Struts Users Mailing List Subject: Re: Credit card validator --- On Thu, 8/21/08, Gundersen, Richard wrote: can someone tell me if there's a credit card validator

[S2] Why there is no support for client side date validator?

2008-07-22 Thread Gabriel Belingueres
Hi, Seeing the file form-close-validate.ftl (in xhtml theme) I see that there is no javascript code for the date validator. Seems like a straightforward addition. Or is there some error condition or limitation that I'm not aware of? Regards, Gabriel

Re: Validator plugin error

2008-07-15 Thread Lukasz Lenart
Hi, Try to comment such entry for Validator plugin and check again, do you have any logs from your container? Maybe the problem is elsewhere? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL

Re: Validator plugin error

2008-07-15 Thread Dani
Lukasz Lenart escribió: Hi, Try to comment such entry for Validator plugin and check again, do you have any logs from your container? Maybe the problem is elsewhere? Regards The validator-rules.xml validations.xml are located under the correct path /WEB-INF/, as specified in the struts

Re: Validator plugin error

2008-07-15 Thread Lukasz Lenart
Check this http://issues.apache.org/struts/browse/STR-2862?focusedCommentId=37312#action_37312 Maybe either you have duplicated commons-validator.jar or in wrong version? Regards -- Lukasz http://www.lenart.org.pl/ - To

Re: Validator plugin error

2008-07-15 Thread Dani
-validator 1.3.1. as shown in this link? http://mvnrepository.com/artifact/commons-validator/commons-validator/1.3.1 I´ve been googling around but didn´t see any clues. Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Validator plugin error

2008-07-15 Thread Dave Newton
--- On Tue, 7/15/08, Dani [EMAIL PROTECTED] wrote: Should I update the depencies of commons-validator 1.3.1. as shown in this link? Well yes; you can't just update a library and assume that it will work without its dependencies. Dave

Re: Validator plugin error

2008-07-15 Thread Lukasz Lenart
15-jul-2008 15:06:33 org.apache.commons.digester.Digester fatalError GRAVE: Parse Fatal Error at line -1 column -1: Premature end of file. org.xml.sax.SAXParseException: Premature end of file. You should also change dtd headers for validator-rules.xml and validations.xml to reflect new common

Re: Validator plugin error

2008-07-15 Thread danipruebas
Hi again, After updating all the dependencies and changing the DTD for the validation.xml and validation-rules.xml: !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd;; I

Re: Validator plugin error

2008-07-15 Thread Lukasz Lenart
As I remember, there is a bug with this, out dtd to WEB-INF and add reference to it http://www.developerdotstar.com/community/node/472 Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Validator plugin error

2008-07-15 Thread danipruebas
OMG, this is an EPIC FAIL : ) Yes, i have saved and referenced it in WEB-INF. Best regards, - Original Message - From: Lukasz Lenart [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 15, 2008 7:23 PM Subject: Re: Validator plugin error As I

Validator plugin error

2008-07-14 Thread danipruebas
Hi, I´m trying to use Struts 1.2 Validator plugin. I guess something in struts-config.xml is missing or wrong. If I add the necessary code to use the plugin validator: plug-in classname=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF

Showing valid characters from a validator mask

2008-07-04 Thread Dimitris Mouchritsas
Hi all, I've got a form bean for a user which has a field username (duuhhh:) We use a mask of ^[a-zA-Z_0-9-]*$. Is there a way I can show the valid characters to the user? Currently the error message in ApplicationResources properties is: errors.invalid={0} is invalid. and the xdoclet tags are

Re: Struts Validator Framework: problem with Custom Validator

2008-06-26 Thread cacodemon79
No-reply? :( However, I solved. Now all works well. ** SERVER-SIDE ** To avoid the deprecated method Resources.getActionMessage(HttpServletRequest request, ValidatorAction va, Field field) I used Resources.getActionMessage(Validator v, HttpServletRequest request, ValidatorAction

Re: Struts Validator Framework: problem with Custom Validator

2008-06-25 Thread cacodemon79
Now, server-side validation works! I changed ActionErrors class with ActionMessages class into my java validation method and into validator-rules.xml. The only problem is that Resources.getActionMessage(request, va, field) method in my custom validator class is deprecated and I don't know how

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-24 Thread cacodemon79
help me. Thanks. cacodemon79 wrote: Hi, I'm using Struts Validator Framework (Struts 1.3). Server-side validation works well. The problem is in client-side validation. The form name I have to validate is: RegistrazioneUtenteForm. In my jsp page I have 2 buttons: 1) html:link href

Struts Validator Framework: problem with Custom Validator

2008-06-24 Thread cacodemon79
I'm using Struts 1.3. I'm trying to write a custom validator to check that 2 fields are identical. 1) I modified my validator-rules.xml by adding my own validator (called uguale): ** validator-rules.xml ** validator name=uguale classname

Re: [S2] Validator Framework

2008-06-23 Thread Lukasz Lenart
Hi, Struts2 use XWork Validation Framework, so you can use it http://www.opensymphony.com/xwork/wikidocs/Validation%20Framework.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread cacodemon79
. cacodemon79 wrote: Hi, I'm using Struts Validator Framework (Struts 1.3). Server-side validation works well. The problem is in client-side validation. The form name I have to validate is: RegistrazioneUtenteForm. In my jsp page I have 2 buttons: 1) html:link href

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Lukasz Lenart
Hi, Maybe you should install Firebug for Firefox (not working with 3.0) and debug the JavaScript? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [struts] Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Dale Newfield
Lukasz Lenart wrote: Maybe you should install Firebug for Firefox (not working with 3.0) and debug the JavaScript? A beta version of firebug does work with 3.0 : http://getfirebug.com/releases/index.html -Dale - To

Re: [struts] Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Lukasz Lenart
A beta version of firebug does work with 3.0 : http://getfirebug.com/releases/index.html Thanks! -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Laurie Harper
javascript alerts. I can't understand where is the problem. I hope you can help me. Thanks. cacodemon79 wrote: Hi, I'm using Struts Validator Framework (Struts 1.3). Server-side validation works well. The problem is in client-side validation. The form name I have to validate

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread cacodemon79
wrote: Hi, I'm using Struts Validator Framework (Struts 1.3). Server-side validation works well. The problem is in client-side validation. The form name I have to validate is: RegistrazioneUtenteForm. In my jsp page I have 2 buttons: 1) html:link href=javascript:submitRegistrazioneUtenteForm

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Lukasz Lenart
Hi, 2008/6/23 cacodemon79 [EMAIL PROTECTED]: Bingo! Now it works! Thanks a lot. However i can't understand why the onsubmit handler is not triggered by the submit() function! Maybe it depends on Web Browser, did you try with others? Regards -- Lukasz http://www.lenart.org.pl/

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Laurie Harper
document.registrazioneUtenteForm.submit()) instead of eval(document.+nomeForm+.submit()) but the result is the same. The form is submitted but I can't see any javascript alerts. I can't understand where is the problem. I hope you can help me. Thanks. cacodemon79 wrote: Hi, I'm using Struts Validator Framework

Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-21 Thread cacodemon79
Hi, I'm using Struts Validator Framework (Struts 1.3). Server-side validation works well. The problem is in client-side validation. The form name I have to validate is: RegistrazioneUtenteForm. In my jsp page I have 2 buttons: 1) html:link href=javascript:submitRegistrazioneUtenteForm

[S2] Validator Framework

2008-06-19 Thread Hoying, Ken
I would like to use the Struts2 validation classes outside of Struts2. What I would like to do specifically is use the UrlValidator to test a string to determine if it is a URL and if it is create the link and if not just display the value. I would like to use the validator for this since we use

Provide links from XDoclet validator tags

2008-06-16 Thread Dimitris Mouchritsas
Hi once more, seems like a struts day to me :) Anyway, using struts 1.2.4 and XDoclet 1.2.3 is there a way to define an error message for a form which includes an argument or something? For example: /** * Set name. * * @param name the value to set. * * @struts.validator

required Int validator -How to.

2008-06-10 Thread ravi_eze
give some string/ char in int field its throwing errors as expected. any help ??? cheers, ravi -- View this message in context: http://www.nabble.com/required-Int-validator--How-to.-tp17761272p17761272.html Sent from the Struts - User mailing list archive at Nabble.com

Re: required Int validator -How to.

2008-06-10 Thread Laurie Harper
ravi_eze wrote: hi, I see that the previous valid int value is being populated when i enter null in an integer text field. I want to show error in such a case. Any ideas how to get this done. The scenario is as follows: 1. When i enter no value in F1: i get validation error asking me to

Struts validator framework

2008-05-15 Thread Zhang, Larry (L.)
Say if I have two text fields, one label is Please enter name:, and the other label is Please enter SSN:. In struts validator framework, if I need to validate these two fields using required validator, is there any way to relate the field label to the message? Or does struts validator support

RE: Struts validator framework

2008-05-15 Thread Givler, Eric
You define the field label using an argument, i.e. field property=username depends=required arg0 key=prompt.username/ /field So the validator is using the field's label to fill in the message. The default message for errors.required is: errors.required={0} is required. So

Error Stream closed while validator put

2008-05-09 Thread hns
hi i have validate fileds password and re-password must same as expression using validator type=expression passwd eq repasswd messagePassword and Re-password must be same/message /validator when i put this in my *-validator.xml and try to check givin difference fiield value gives error like

Plz help not getting o/p when changed to validator form

2008-05-05 Thread Raghu varma bhupathiraju
; !-- This is a blank Struts configuration file with an example welcome action/page and other commented sample elements. Tiles and the Struts Validator are configured using the factory defaults and are ready-to-use. NOTE: If you have a generator tool to create the corresponding Java

Re: Plz help not getting o/p when changed to validator form

2008-05-05 Thread maestro
action/page and other commented sample elements. Tiles and the Struts Validator are configured using the factory defaults and are ready-to-use. NOTE: If you have a generator tool to create the corresponding Java classes for you, you could include the details

quickstart and the date range validator

2008-04-23 Thread Peter Wages
This may be a duplicate. I'm a new user of this list. I modified the quickstart demo application by adding person.dateOfBirth and person.age to do some tests with the validators. I added a an intrange validator on the age and a daterangevalidator and a regex validator on the date of birth

quickstart and the date range validator

2008-04-22 Thread Peter Wages
I modified the quickstart demo application by adding person.dateOfBirth and person.age to do some tests with the validators. I added a an intrange validator on the age and a daterangevalidator and a regex validator on the date of birth plus additional required validators on the new fields

[S2] Matching string validator

2008-04-14 Thread Kelly.Graus
Hello, Does struts 2 have a built in validator that will allow me to make sure two fields match (ie, two password fields). From looking around, it seems that struts 1 had validatewhen which could be used, but I haven't been able to find anything for struts 2. Thanks! Kelly -- View

Re: [S2] Matching string validator

2008-04-14 Thread Guillaume Bilodeau
Sure, you can use an ExpressionValidator annotation with an OGNL expression like this: @ExpressionValidator(expression = password1.equals(password2), ...) Cheers, GB Kelly.Graus wrote: Hello, Does struts 2 have a built in validator that will allow me to make sure two fields match (ie

Re: [S2] Matching string validator

2008-04-14 Thread Dave Newton
--- Kelly.Graus [EMAIL PROTECTED] wrote: Does struts 2 have a built in validator that will allow me to make sure two fields match (ie, two password fields). From looking around, it seems that struts 1 had validatewhen which could be used, but I haven't been able to find anything for struts 2

Re: [S2] Matching string validator

2008-04-14 Thread Kelly.Graus
Guillaume Bilodeau wrote: Sure, you can use an ExpressionValidator annotation with an OGNL expression like this: @ExpressionValidator(expression = password1.equals(password2), ...) Cheers, GB Thanks for the reply! I'm using field validators, so I did this: field-validator type

Re: [S2] Matching string validator

2008-04-14 Thread Kelly.Graus
Kelly.Graus wrote: Thanks for the reply! I'm using field validators, so I did this: field-validator type=fieldexpression ![CDATA[#password1.equals( password2 )]] messageThe passwords do not match!/message /field-validator Which works perfectly. Thanks

Re: Commons Validator Issue with Collections

2008-04-09 Thread Laurie Harper
Neither Commons Validator nor Struts knows how to process XML requests like that out of the box. Assuming Struts 1, the answer is that you will have to write your own logic to populate the form bean from the XML request, after which validation can be performed the same as you would

Commons Validator Issue with Collections

2008-04-08 Thread Ghaznavi, Syed
It's a question regarding commons validator api, wherein i am trying to validate an input request form (xml-request) which contains a collection of items...like OrdersInputRequest Order OrderId222/OderId OrderDate04/04/2004/OrderDate /Order Order OrderId223/OderId

[s2] conversion validator and repopulateField

2008-04-02 Thread Kevin Wade
Hello. I am having a problem getting repopulateField to work. In short, I have added date validation to one of my actions. In my validation xml file, I have this: field name=moviereview.reviewdate field-validator type=conversion short-circuit=true param name

Re: [s2] conversion validator and repopulateField

2008-04-02 Thread Kevin Wade
to one of my actions. In my validation xml file, I have this: field name=moviereview.reviewdate field-validator type=conversion short-circuit=true param name=repopulateFieldtrue/param messageDate of Review entered is not a valid date./message /field

How to use validator frame work.

2008-04-01 Thread balaji.m.cs
i am using struts for my front end handling of data. now i wish to go for validator framework for handling form validation given by user, I have put the validaton.xml and validaton-rules.xml into web-inf and i hav plugged in the plugin with className and paramnames as the xml files but when my

Re: How to use validator frame work.

2008-04-01 Thread Dave Newton
What version of Struts 1 are you using? Dave --- balaji.m.cs [EMAIL PROTECTED] wrote: i am using struts for my front end handling of data. now i wish to go for validator framework for handling form validation given by user, I have put the validaton.xml and validaton-rules.xml into web-inf

Inheritence of validator annotations

2008-04-01 Thread Allen, Daniel
Hi, all. I have a superclass where almost all of the subclasses will require several validations for a particular field, but one subclass will use some but not all of those validations. I know that you can add @SkipValidation to avoid all validators, but is there something that you can use to

Re: Inheritence of validator annotations

2008-04-01 Thread Jeromy Evans
Allen, Daniel wrote: Hi, all. I have a superclass where almost all of the subclasses will require several validations for a particular field, but one subclass will use some but not all of those validations. I know that you can add @SkipValidation to avoid all validators, but is there something

Validator: validatorResult memory issue

2008-03-31 Thread Martin Choma
in reset() method of ValidatorForm and build again so IMHO should be safe. But aren't we missing something? We still question ourselves Why then isn't struts doing something like that automatically. Thanks for all yout comments. (We are using struts 1.2.9 for our project and Jakarta Common Validator

The validator does not work

2008-03-25 Thread Chen Chunwei
Hi all, It seems that my struts application's validator does not work. I've add plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml / /plug-in to my struts-config.xml and these two files

Re: The validator does not work

2008-03-25 Thread Chen Chunwei
Finally I found the problem! I did apply a slight change to the validator.xml yesterday: just added the following xml header. !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN http://jakarta.apache.org/commons/dtds/validator_1_1

Using xdoclets and minlength from validator

2008-03-20 Thread Dimitris Mouchritsas
Hi all, I'm trying to make a password field be at least 6 characters in length but the check doesn't seem to work. Here's my code: /** * @struts.validator type=required,minlength,maxlength,mask * * @struts.validator-var name=minlength value=5 * @struts.validator-var

RE: short-circuit=true not working in field validator

2008-03-10 Thread Chamara Gunaratne
To: Struts Users Mailing List Subject: RE: short-circuit=true not working in field validator --- Chamara Gunaratne [EMAIL PROTECTED] wrote: s:form action=ApplicationSubmitAction.do validate=true Ah. I'm not sure that the short-circuiting behavior works with client-side validation, although it probably

RE: short-circuit=true not working in field validator

2008-03-07 Thread Chamara Gunaratne
Hmmm, I tried setting the log level to DEBUG and it yielded a mass of logging entries, but nothing that was particularly insightful. Grepping on short-circuit, validator, etc didn't bring out anything useful. Very strange problem, everything else seems to be working fine and I cannot find

RE: short-circuit=true not working in field validator

2008-03-07 Thread Dave Newton
Please repost your configs, JSP, and action; I'll look at it again. Dave --- Chamara Gunaratne [EMAIL PROTECTED] wrote: Hmmm, I tried setting the log level to DEBUG and it yielded a mass of logging entries, but nothing that was particularly insightful. Grepping on short-circuit, validator

RE: short-circuit=true not working in field validator

2008-03-07 Thread Chamara Gunaratne
Dave: Thank you, here's the files: ApplicationAction-validation.xml: !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=user.firstName field-validator type

RE: short-circuit=true not working in field validator

2008-03-07 Thread Dave Newton
--- Chamara Gunaratne [EMAIL PROTECTED] wrote: s:form action=ApplicationSubmitAction.do validate=true Ah. I'm not sure that the short-circuiting behavior works with client-side validation, although it probably should. I don't see any code in the generated JavaScript, however, that would enforce

short-circuit=true not working in field validator

2008-03-05 Thread Chamara Gunaratne
: validators field name=user.firstName field-validator type=required short-circuit=true messagePlease enter your first name./message /field-validator field-validator type=regex short-circuit=true param name=expression^[a-z

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