HI,
I have gone through User's Guide provided in your website for the
use requiredif and validwhen in struts 1.3 but i m not getting the
desired result. please help me. I am providing the code below. Date
field is required when byDate is selected which is a radio b
Hi,
validator-rules contents:
Thanks again,
André
From: Martin Gainty
To: acastanheira2...@yahoo.com.br
Sent: Monday, October 5, 2009 3:19:25 PM
Subject: RE: Struts validation (validwhen)
please post contents of validator-rules.xml
Martin Gainty
Hi, I have a form with two fields, when one is null the other is required, so
I need to check one against the other. I´ve done the config below, but
nothing happens:
test
((codigo == null) or (*this* != null))
mask ${alfa}
test
((nome == null) or (*this* != null))
mask ${numInst}
I believe the correct syntax is:
test
(*this* != null)
But why are you doing this? Such a simple validation can be
accomplished with the "required" validator.
Paul
On Mon, Jul 13, 2009 at 11:20 AM, Lukasz
Lenart wrote:
> 2009/7/13 Odelya YomTov :
>> But I don't see that it works! Why?
>
>
2009/7/13 Odelya YomTov :
> But I don't see that it works! Why?
Did you try like this?
data.category != \'empty\'
Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/
-
To unsubscribe, e-mail: user-unsub
Hi!
I have html:select with countries list
I want to make sure that the user clicked on a value
Jsp:
--
validation.xm
I don't think the validWhen validator supports either type cooercion or
arithmetic. You'll probably need to handle this validation
programatically in your validate() method.
L.
Jefferson Wilson wrote:
I have a form where the user will peform a simple calculation in order to
preve
I have a form where the user will peform a simple calculation in order to
prevent spam (1 + 10 = 11). As a result, I would like to use the 'validwhen'
validation step to handle this. I am overlooking something I believe.
I have created the following:
1) Field Definition In vali
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Paul,
Paul Benedict wrote:
> Struts 1.4-SNAPSHOT has enhanced validwhen support for decimal point
> numbers. I haven't had anyone besides me test it, but you can be the first
> if you want to! I'd like to know if it works for you!
Struts 1.4-SNAPSHOT has enhanced validwhen support for decimal point
numbers. I haven't had anyone besides me test it, but you can be the first
if you want to! I'd like to know if it works for you!
On 9/7/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
>
> -BE
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dave,
Dave Newton wrote:
> Custom validator
:(
I'll just implement it in my action. This is too custom to actually be
re-usable.
> and smack whoever wanted decimal
> months on the back of the hand with a ruler.
Yeah, really. Unfortunately, we're d
dator list, but, hey,
> I'm already a member of this list and I'm sure
> someone knows the answer.
>
> I have a form that contains 4 fields: year and month
> for both min and
> max age. (So, I have min years, min months, max
> years, max months).
>
> I have a v
min years, min months, max years, max months).
I have a validWhen comparison that checks to see that the combination of
years and months is actually smaller than the combination entered for
max years and months (basically, to prevent you from entering 1y1m as
the min and 0y1m as the max).
Here i
form which stores the submit
button's value for example if the submit button's value is "Modify" then
action property value is "Modify" and action property value is "null" if I
submit the page using change in the dropdown list value. I am using
validwhen to
the submit
button's value for example if the submit button's value is "Modify" then
action property value is "Modify" and action property value is "null" if I
submit the page using change in the dropdown list value. I am using
validwhen to check
I do not believe validwhen generates Javascript validation. It is only on
the server-side.
On 8/10/07, Vivek Chauhan <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I am trying to do a conditional validation using 'validwhen'.
> There is group of two radio butt
Hi,
I am trying to do a conditional validation using 'validwhen'.
There is group of two radio buttons (values 'Yes' and 'No') and on selecting
any one of them either a drop down box is displayed or a text box is
displayed.
I want to validate the text box or drop
n <[EMAIL PROTECTED]> wrote:
> > I have the following validation rule :
> >
> > > depends="validwhen">
> >
> >
> > test
> > (*this* == newPa
I have the following validation rule :
>
> depends="validwhen">
>
>
> test
> (*this* == newPassword)
>
>
>
> In my ressource file:
>
wrong?
By default the "validwhen" validator uses the key "errors.required" -
if you want to use a different key for the message then you need to
specify it for the field using a element - something like
Niall
-
I have the following validation rule :
test
(*this* == newPassword)
In my ressource file:
errors.required={0} is required.
errors.invalid={0} is invalid.
valid.confirmnewpassword=Confirm new passwo
Dave Newton wrote:
--- Glenn Wilson <[EMAIL PROTECTED]> wrote:
[client-side validwhen]
IIRC there is no client-side validation for validwhen,
but you'd want to confirm that (although you may have
already ;)
Dave is correct. The validwhen rule is server-side only. Just to con
--- Glenn Wilson <[EMAIL PROTECTED]> wrote:
> [client-side validwhen]
IIRC there is no client-side validation for validwhen,
but you'd want to confirm that (although you may have
already ;)
d.
__
Do You Yahoo!?
Tired of spam? Yahoo
Hi all, new to using validator. I have validator working on most of my
applicaiton but having a problem doing a "validwhen". I've been using the
examples in the "Jakarta Struts Cookbook".
Here is my question(s):
I've noticed that javascript code is generated uni
On 2/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Thank you for your reply.
Why is it only server-side ?
Because no-one has written the equivalent functionality in JavaScript.
Validwhen uses antlr to evaluate expressions on the server side -
replicating its functionality in Java
Thank you for your reply.
Why is it only server-side ?
Regards,
Selon Niall Pemberton <[EMAIL PROTECTED]>:
> No its server-side only.
>
> Niall
>
> On 2/27/07, jmpdev <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I would like to know if it is poss
No its server-side only.
Niall
On 2/27/07, jmpdev <[EMAIL PROTECTED]> wrote:
Hi,
I would like to know if it is possible to call validWhen on the client
side?
I didn't find validWhen.js is it possible to find it somewhere?
Thanks,
Regards,
Hi,
I would like to know if it is possible to call validWhen on the client
side?
I didn't find validWhen.js is it possible to find it somewhere?
Thanks,
Regards, Jean-Marie.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Nathan,
Nathan Coast wrote:
> this feels better as the existing framework is responsible for executing
> all validations, assembling cumulative errors and creating localised
> messages. I'm just not sure it's possible to add validations.
Whenever I
>
>>
>>
>>
>>test
>>
>> ((fieldB == 'java.lang.Integer') && validateInteger(fieldA))
>>|| ((fieldB == 'java.lang.Float') && validateFloat(fieldA))
>>
t; validation to operate on fieldA depends on the value of fieldB.
>>
>>
>>
>>
>>test
>>
>> ((fieldB == 'java.lang.Integer') && validateInteger(fieldA))
>>|| ((fieldB == 'java.l
;> ((fieldB == 'java.lang.Integer') && validateInteger(fieldA))
>>|| ((fieldB == 'java.lang.Float') && validateFloat(fieldA))
>>|| ((fieldB == 'java.util.Date') && validateDate(fieldA))
>> etc
>>
test
((fieldB == 'java.lang.Integer') && validateInteger(fieldA))
|| ((fieldB == 'java.lang.Float') && validateFloat(fieldA))
|| ((fieldB == 'java.util.Date') && validateDate(fieldA))
etc....
value of fieldB.
test
((fieldB == 'java.lang.Integer') && validateInteger(fieldA))
|| ((fieldB == 'java.lang.Float') && validateFloat(fieldA))
|| ((fieldB == 'java.util.Date') && validateDate(fieldA))
etc
m validation method is
probably what I need.
cheers
Nathan
Niall Pemberton wrote:
On 2/9/07, Nathan Coast <[EMAIL PROTECTED]> wrote:
Hi,
I have two fields in a form. I believe the validwhen rule executes a
specific rule (e.g. required) on field a based upon the value of field
b. The
On 2/9/07, Nathan Coast <[EMAIL PROTECTED]> wrote:
Hi,
I have two fields in a form. I believe the validwhen rule executes a
specific rule (e.g. required) on field a based upon the value of field
b. The situation I have is that I need to execute different validations
on field a determi
Hi,
I have two fields in a form. I believe the validwhen rule executes a
specific rule (e.g. required) on field a based upon the value of field
b. The situation I have is that I need to execute different validations
on field a determined by the value of field b.
Is this possible client
Hi,
I am stuck with struts 1.1 for my project but would like to use
validWhen(which was added in Struts 1.2.0) for doing some validations. Is it
possible to put in say the validator class and add the rule in
validator-rules and use it??
Or would this involve too much tinkering and im better off
Hi
I am thinking of extending (hacking) antlr classes that are distributed with
commons validator.
I am wondering if this idea should point to struts instead of commons
validator.
In validwhen validator you are able to write quite complicated conditions,
but the real problem for me is using
fea jabi wrote:
Need to check if the value entered is greater than zero.
Tried the below using the validwhen
test
(*this* > "0.00")
validation seams to be working right when e
Need to check if the value entered is greater than zero.
Tried the below using the validwhen
test
(*this* > "0.00")
validation seams to be working right when entered 0,0.
fea jabi wrote:
can we use validwhen to do date comparision?
we are using date pattern MM-dd-. the data type in form bean
property is String.
No, according to the last note in the validwhen section of the Validator
Guide [1],
* If both items to be compared are convertable to ints,
a
can we use validwhen to do date comparision?
we are using date pattern MM-dd-. the data type in form bean property is
String.
Thanks.
_
Share your special moments by uploading 500 photos per month to Windows Live
Spaces
No, validwhen is server-side only.
L.
Walter do Valle wrote:
I was looking for an information in Struts Validator site and found
nothing about.
Does validwhen generate client side validation like other rules like
integer or intRange?
I don't know if validWhen shortcircuits, but
Dave Newton wrote:
From: Mallik [mailto:[EMAIL PROTECTED]
HI friend
i have problem with validwhen, it is not working
What, specifically, does not work?
test
(noLunch == 'Y')
If I understand the documentation at
http://struts.apache.org/1.2.9
From: Walter do Valle [mailto:[EMAIL PROTECTED]
> If tipoDivisao == "I" qtPartes is mandatory and cannot be null.
That's why I asked about the short-circuiting; I don't have the source
in front of me to check.
If tipoDivisao=="I" then the OR will always be true and it wouldn't need
to evaluate th
I was looking for an information in Struts Validator site and found
nothing about.
Does validwhen generate client side validation like other rules like
integer or intRange?
I don't know if validWhen shortcircuits, but if it does, wouldn't you
want an "and" there an
s* != null) )
See the example in Struts site:
http://struts.apache.org/1.2.9/userGuide/dev_validator.html
Dave Newton escreveu:
From: Walter do Valle [mailto:[EMAIL PROTECTED]
Thried. Does not work.
Nuwan Chandrasoma escreveu:
( (tipoDivisao != "I") or (*this* != null) )
From: Walter do Valle [mailto:[EMAIL PROTECTED]
> Thried. Does not work.
> Nuwan Chandrasoma escreveu:
> > ( (tipoDivisao != "I") or (*this* != null) )
I don't know if validWhen shortcircuits, but if it does, wouldn't you
want an &q
Thried. Does not work.
This was my first test.
Nuwan Chandrasoma escreveu:
try this
( (tipoDivisao != "I") or (*this* != null) )
- Original Message - From: "Walter do Valle"
<[EMAIL PROTECTED]>
To:
Sent: Tuesday, October 10, 2006 6:36 PM
Subject: Does val
try this
( (tipoDivisao != "I") or (*this* != null) )
- Original Message -
From: "Walter do Valle" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, October 10, 2006 6:36 PM
Subject: Does validwhen has a bug?
Hello all
I'm trying to use validwhen from Stru
Hello all
I'm trying to use validwhen from Struts Validator without success. I tried
everithing it is possible, but it doesn't work. I have a radio button and a
text field.
My validation rule is: textfield is mandatory if certain option of my radio
is cheked. See below. In other
> From: Mallik [mailto:[EMAIL PROTECTED]
>
> HI friend
> i have problem with validwhen, it is not working
What, specifically, does not work?
>
>
>
> test
> (noLunch == 'Y')
>
>
If I understand the documentation
HI friend
i have problem with validwhen, it is not working
this is my code snipet
validation.xml
-
test
Hello all
I'm trying to use ValidWhen from Struts without sucess. I tried
everithing is possible, but it doesn't work. I have a radio button and a
text field.
My validation rule is: textfield is mandatory if some option of my radio
is cheked. See bwlow.
Is there something wrong? A
I'm doing password field validation using 'validwhen'. I have a user
form used for multiple purposes (create a user, modify a user with
optionally changing the password). So I have my password and
passwordConfirm properties set up, but I'm stuck at the last
part--makin
: "Scott Van Wart" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Saturday, June 03, 2006 6:12 PM
Subject: Re: Validation 'depends' attribute order, and 'validwhen'
Jakub Milkiewicz wrote:
If you are thinking of creating custom validator reme
Hi.
Exactly boy :).
2006/6/4, Scott Van Wart <[EMAIL PROTECTED]>:
Jakub Milkiewicz wrote:
> If you are thinking of creating custom validator remember that even if
> your
> custom validator fails it doesn't mean that your form is invalid! You
> must
> remember to add ActionError/ActionMessage t
Jakub Milkiewicz wrote:
If you are thinking of creating custom validator remember that even if
your
custom validator fails it doesn't mean that your form is invalid! You
must
remember to add ActionError/ActionMessage to ActionErrors/ActionMessages
passed as a parameter to yor validator.
Wow,
d my own 2 validators : gotoNextIf, skipNextIf. Both are derived
from ValidWhen validator but gives me great flexibility in depends chain.
GotoNextIf evaluates condition and if its true it returns true and control
is passed to next validator in a chain.
SkipNext does the same job but return
stead.
Not sure if I communicated this correctly, as I referenced the
'validwhen' only in the subject and didn't refer to it in my message
body (just to set the record straight I've been using Java for 6 years,
4 years as a full-time job). I wasn't sure about the expre
On 6/2/06, Scott Van Wart <[EMAIL PROTECTED]> wrote:
If a bean's property is the empty string "", does a test like (property
== null) suffice? Or do I have to say ((property == null) or (property
== ''))?
You need to test for both conditions in the latter case, but the particular
approach yo
If a bean's property is the empty string "", does a test like (property
== null) suffice? Or do I have to say ((property == null) or (property
== ''))?
- Scott
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comman
ed to java.lang.Long, it returns the value itself, rather than
Boolean.TRUE or Boolean.FALSE. I want to combine my own pluggable
validators with the 'validwhen' validator, but I'm not sure of the order:
- When multiple validators are listed in the 'depends' attribute, a
No, js support for validwhen is not provided. You can tell by looking at
the validation-rules.xml file, which does not have a jsFunction
attribute defined on the "validwhen" validator element.
-Original Message-
From: Cassio Pereira [mailto:[EMAIL PROTECTED]
Sent: Friday, Jun
Hi all.
Simple question. Does "validwhen" works client side?
Regards
--
Cassio Santos Pereira
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List"
To: "Struts Users Mailing List"
Subject: RE: validation with validwhen
Date: Fri, 26 May 2006 11:56:35 -0500
"and getting the error when used double."
Could you explain that? Like what exactly do you input when
, 2006 11:51 AM
To: user@struts.apache.org
Subject: RE: validation with validwhen
no, it's not a dumb question.
But yah, I do have the key right!! and getting the error when used
double.
Using 1.2.7 version of struts.
Actually I did try
>(*this* > 0) too but, this didn't wo
o: "Struts Users Mailing List"
To: "Struts Users Mailing List"
Subject: RE: validation with validwhen
Date: Fri, 26 May 2006 10:20:01 -0500
Fea,
What version of struts are you using? Dumb question, but are you sure
the key "lbl.notvalidnumber" is spelled right in you
To: Struts Users Mailing List
Subject: RE: validation with validwhen
and also make sure it's value is greater than Zero.
Do you need >= or > than 0?
(*this* > 0) might do the trick.
Thanks,
Vijaya
-Original Message-
From: fea jabi [mailto:[EMAIL PROTECTED]
Sent: Friday,
alidation with validwhen
Thankyou for the response.
tried
(*this* >= 0)
but still not getting error message. any other suggessions?
>From: "Chaudhary, Harsh" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List"
>To: "Struts Users Mailing List&quo
Thankyou for the response.
tried
(*this* >= 0)
but still not getting error message. any other suggessions?
From: "Chaudhary, Harsh" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List"
To: "Struts Users Mailing List"
Subject: RE: validation with
Instead of this:
(*this* >= 0)
Use this:
(*this* >= 0)
Its to do with how your '>' characters are parsed.
Harsh.
-Original Message-
From: fea jabi [mailto:[EMAIL PROTECTED]
Sent: Friday, May 26, 2006 8:01 AM
To: user@struts.apache.org
Subject: RE: validation w
t; <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List"
>To: user@struts.apache.org
>Subject: validation with validwhen
>Date: Thu, 25 May 2006 12:31:56 -0400
>
>want to validate a property for
>
>required,
>and also make sure it's value
can someone help me with this please? thanks.
From: "fea jabi" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List"
To: user@struts.apache.org
Subject: validation with validwhen
Date: Thu, 25 May 2006 12:31:56 -0400
want to validate a property for
require
when nothing is entered by the user, getting the required message. When
entered the characters not getting the message of validwhen.
what am I missing?
Thanks.
_
Dont just search. Find. Check out the new MSN Searc
Struts 1.2.9, Validator 1.2.0.
If I used the "required" validation, when the user enters whitespace in a form
field, the validation fails. However, when using "validwhen" it seems that
whitespace is accepted.
In the validation I'm using (below), if the user leaves la
Jakub Milkiewicz wrote:
Hi
I am using struts 1.2.8 and i have a problem with test condition with
validwhen validator.
Eveything works fine except when i try to compare sth with a string
containing values not from iso8859-1 charset .i.e
test
Hey,
I try to use validwhen rule on client side validation, but it never works.
Finally, find the answer --> it doesn't apply to client side.
Could some one confirm this?
Refer to: http://www.junlu.com/msg/236451.html
Cheer
Hi
I am using struts 1.2.8 and i have a problem with test condition with
validwhen validator.
Eveything works fine except when i try to compare sth with a string
containing values not from iso8859-1 charset .i.e
test
( *this
Hi I tried now for several hours to fix my validwhen-example.
The property time should only be validated if the checkbox (property
calculatingShift)
Is not checked.
How can help me? Thank you so much
Ciao,
would someone be so kind to support me with the following problem:
A date field should just be validated
if another checkbox isn't used:
the name of the other Form property that should also be used for the test
(as the condition is selectionForShift[0].checked (true or false)
I'm not sur
Valid when won't compare dates - you need to write your own custom
validator to do this.
Niall
On 3/21/06, starki78 <[EMAIL PROTECTED]> wrote:
> Can someone give me a hint how to improve
> this example:
> I want to use this in that way assuring that
> one date is later than another:
>
>
>
Can someone give me a hint how to improve
this example:
I want to use this in that way assuring that
one date is later than another:
valid
(*this* >DateFrom)
-
To unsubscribe, e
needs no validation (i.e. every text is
> allowed), but when the select box has a special value (in my case it is
> "text.birthday"), I want a validator to confirm that the text entered is
> a date.
>
> I thought about a combination of "validwhen" and "date"
I thought about a combination of "validwhen" and "date" (see example
below) The condition only allows that the text field might be empty in
some circumstances, but if the field is not empty it must be a date.
Do I have to write an own validator for this, or is there a wa
OK I just tried this myself and got the same error "unexpected token"
error - looks like its a bug. Can you file a bug report against Struts
for this please:
http://issues.apache.org/bugzilla/
Niall
On 3/16/06, coudot <[EMAIL PROTECTED]> wrote:
>
> sorry for the mistake.
>
> my code is :
>
>
>
For information, I use Struts 1.2.8.
I am not sure the indexed property will help me as all works fine except the
validwhen
--
View this message in context:
http://www.nabble.com/Validwhen-and-array-t1291360.html#a3456760
Sent from the Struts - User forum at Nabble.com
any idea?
--
View this message in context:
http://www.nabble.com/Validwhen-and-array-t1291360.html#a3451426
Sent from the Struts - User forum at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
sorry for the mistake.
my code is :
test
((*this*!=null) or (adr[1] !=null ))
--
View this message in context:
http://www.nabble.com/Validwhen-and-array-t1291360.html#a3437728
Sent from the Struts - User forum at Nabble.com
On 3/16/06, coudot <[EMAIL PROTECTED]> wrote:
>
> Thanks but I have already looked at this example.
> There is not control validwhen on an element of an array.
> All the other controls(intRange,required...) works fine on my field adr[0].
>
> the problem is the adr[1] in th
Thanks but I have already looked at this example.
There is not control validwhen on an element of an array.
All the other controls(intRange,required...) works fine on my field adr[0].
the problem is the adr[1] in the , although it seems to be
allowed in the struts documentation.
--
View this
Take a look at the struts-examples webapp, theres a validwhen example
in the "validator" module - since 1.2.7 or 1.2.8 I think
Niall
On 3/16/06, coudot <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have an array of two adress lines in my form.
> I want to check if AT LEAST
Hi,
I have an array of two adress lines in my form.
I want to check if AT LEAST one line is not empty.
I want to use the validwhen to check the first line.
The first line is valid only it's not null or the second line is not null.
But I have an error on my page when the instruction is call
validwhen is server side only.
Niall
On 3/16/06, Partha Pratim Dutta <[EMAIL PROTECTED]> wrote:
> I am using struts validator framework for client side & server side
> validations. I am facing issue with validwhen rule. Validator rules like
> 'required', 'minlen
I am using struts validator framework for client side & server side
validations. I am facing issue with validwhen rule. Validator rules like
'required', 'minlength', 'maxlength' are working fine.
The form has 2 fields
1. Radio button - 'curr
,
repeatOffendersDaysBack is not. I am trying to write my validation for
this. I have something like the following:
test
((trackingEnabled == null) or (*this* !=
null))
My question is do I need to do anything special for checkbox comparisons
in the validwhen? I have
niels wrote:
Hi,
I want to validate a form:
company field may only be filled if the selected (by radiobutton)
addresstype is equal to CN
I try to do this via:
test
((*this* != null) and
(addressType=="CN"))
Hi,
I want to validate a form:
company field may only be filled if the selected (by radiobutton)
addresstype is equal to CN
I try to do this via:
test
((*this* != null) and
(addressType=="CN"))
Nicolas De Loof wrote:
Hello,
I've a form where some data are required IF an option is selected + I've
to check for duplicated entries.
I can setup validation rules using validwhen for both case, but how to
register those 2 rules (with different message) under the same validwhen
1 - 100 of 196 matches
Mail list logo