RE: VOTE: Behavior of Validator

2002-09-20 Thread Byrne, Steven

I think the behavior of whether to terminate field level checking on the
first field failure should be controllable.  For my company's
application, it is important to show all the failures for a given field,
so the user knows that not only is the field required, but it's a
telephone number field which has a specific syntax (say).  Right now,
and even with the proposed changes, Struts validator doesn't let me do
that -- it has a hardwired policy of stopping on the first field error.
I am ok with that being the default behavior, but I do think it should
be configurable.

Steve

> -Original Message-
> From: phpsurf [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 1:20 AM
> To: Struts Developers List
> Subject: RE: VOTE: Behavior of Validator
> 
> 
> +1 definitely
> 
> I definitely agree with both:
> - The validation process should first iterate through all 
> fields and then,
> for each field, iterate through its scpecific validation rules.
> - The validation process can stop (for each field) at the 
> first unvalidated
> rule, but it should not stop at the first unvalidated field ...
> 
> 
> > -Original Message-
> > From: James Turner [mailto:[EMAIL PROTECTED]]
> > Sent: jeudi 19 septembre 2002 19:41
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: VOTE: Behavior of Validator
> >
> >
> > As currently written, the Validator has what I consider a quirk.
> >
> > Suppose you have two fields, username and password.  Username has
> > "depends=required" and password has "depends=required.notgod"
> > (where notgod
> > is a test that makes sure that the user didn't choose god as a
> > password).  The following behavior occurs:
> >
> > username=blank, password=blank: two errors generated on "required"
> > username=blank, password=god: one error generated on "required"
> > username=george, password=god: one error genereated on "notgod"
> >
> > This is because the Validator won't look at notgod until *all*
> > fields pass
> > the "required" test.
> >
> > I think this is a broken behavior.  It leads to web forms 
> where the user
> > thinks that they've filled in all the fields correctly, but 
> then get new
> > error messages they've never seen before.  I'd like to correct
> > this before
> > Validator freezes for a release, but I want to make sure no 
> one really
> > really thinks that the current behavior is somehow the 
> right one.  So
> > please vote:
> >
> > +1 = Change Validator so that this doesn't occur
> > 0 = I don't give a hoot
> > -1 = I really like the way it works now (please give a reason)
> >
> > I'm sending this both to Commons and Struts because both 
> communities are
> > impacted by the change.
> >
> > James
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> 
> Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 
> 150,92 euros d'économies !
> Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
> + 1 mois de jeu en réseau offert ! 
> Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: VOTE: Behavior of Validator

2002-09-20 Thread Andres Marcel (KASO 211)

James, 

+1 is the right way to go. Let the user immedately know, what was wrong. 
Don't give the information part by part. 

Marcel


I definitely agree with both:
- The validation process should first iterate through all fields and then,
for each field, iterate through its scpecific validation rules.
- The validation process can stop (for each field) at the first unvalidated
rule, but it should not stop at the first unvalidated field ...


> -Original Message-
> From: James Turner [mailto:[EMAIL PROTECTED]]
> Sent: jeudi 19 septembre 2002 19:41
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: VOTE: Behavior of Validator
>
>
> As currently written, the Validator has what I consider a quirk.
>
> Suppose you have two fields, username and password.  Username has
> "depends=required" and password has "depends=required.notgod"
> (where notgod
> is a test that makes sure that the user didn't choose god as a
> password).  The following behavior occurs:
>
> username=blank, password=blank: two errors generated on "required"
> username=blank, password=god: one error generated on "required"
> username=george, password=god: one error genereated on "notgod"
>
> This is because the Validator won't look at notgod until *all*
> fields pass
> the "required" test.
>
> I think this is a broken behavior.  It leads to web forms where the user
> thinks that they've filled in all the fields correctly, but then get new
> error messages they've never seen before.  I'd like to correct
> this before
> Validator freezes for a release, but I want to make sure no one really
> really thinks that the current behavior is somehow the right one.  So
> please vote:
>
> +1 = Change Validator so that this doesn't occur
> 0 = I don't give a hoot
> -1 = I really like the way it works now (please give a reason)
>
> I'm sending this both to Commons and Struts because both communities are
> impacted by the change.
>
> James
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>



Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert ! 
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: VOTE: Behavior of Validator

2002-09-20 Thread phpsurf

+1 definitely

I definitely agree with both:
- The validation process should first iterate through all fields and then,
for each field, iterate through its scpecific validation rules.
- The validation process can stop (for each field) at the first unvalidated
rule, but it should not stop at the first unvalidated field ...


> -Original Message-
> From: James Turner [mailto:[EMAIL PROTECTED]]
> Sent: jeudi 19 septembre 2002 19:41
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: VOTE: Behavior of Validator
>
>
> As currently written, the Validator has what I consider a quirk.
>
> Suppose you have two fields, username and password.  Username has
> "depends=required" and password has "depends=required.notgod"
> (where notgod
> is a test that makes sure that the user didn't choose god as a
> password).  The following behavior occurs:
>
> username=blank, password=blank: two errors generated on "required"
> username=blank, password=god: one error generated on "required"
> username=george, password=god: one error genereated on "notgod"
>
> This is because the Validator won't look at notgod until *all*
> fields pass
> the "required" test.
>
> I think this is a broken behavior.  It leads to web forms where the user
> thinks that they've filled in all the fields correctly, but then get new
> error messages they've never seen before.  I'd like to correct
> this before
> Validator freezes for a release, but I want to make sure no one really
> really thinks that the current behavior is somehow the right one.  So
> please vote:
>
> +1 = Change Validator so that this doesn't occur
> 0 = I don't give a hoot
> -1 = I really like the way it works now (please give a reason)
>
> I'm sending this both to Commons and Struts because both communities are
> impacted by the change.
>
> James
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>



Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert ! 
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: VOTE: Behavior of Validator

2002-09-19 Thread Jesse Alexander (KADA 11)

+1 
BUT it must be configurable (have a config-switch to choose between behaviours)

Alexander

-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 19. September 2002 19:41
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: VOTE: Behavior of Validator


As currently written, the Validator has what I consider a quirk.

Suppose you have two fields, username and password.  Username has 
"depends=required" and password has "depends=required.notgod" (where notgod 
is a test that makes sure that the user didn't choose god as a 
password).  The following behavior occurs:

username=blank, password=blank: two errors generated on "required"
username=blank, password=god: one error generated on "required"
username=george, password=god: one error genereated on "notgod"

This is because the Validator won't look at notgod until *all* fields pass 
the "required" test.

I think this is a broken behavior.  It leads to web forms where the user 
thinks that they've filled in all the fields correctly, but then get new 
error messages they've never seen before.  I'd like to correct this before 
Validator freezes for a release, but I want to make sure no one really 
really thinks that the current behavior is somehow the right one.  So 
please vote:

+1 = Change Validator so that this doesn't occur
0 = I don't give a hoot
-1 = I really like the way it works now (please give a reason)

I'm sending this both to Commons and Struts because both communities are 
impacted by the change.

James



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: VOTE: Behavior of Validator

2002-09-19 Thread V. Cekvenich

+1 and thanks
V.

James Turner wrote:
> As currently written, the Validator has what I consider a quirk.
> 
> Suppose you have two fields, username and password.  Username has 
> "depends=required" and password has "depends=required.notgod" (where 
> notgod is a test that makes sure that the user didn't choose god as a 
> password).  The following behavior occurs:
> 
> username=blank, password=blank: two errors generated on "required"
> username=blank, password=god: one error generated on "required"
> username=george, password=god: one error genereated on "notgod"
> 
> This is because the Validator won't look at notgod until *all* fields 
> pass the "required" test.
> 
> I think this is a broken behavior.  It leads to web forms where the user 
> thinks that they've filled in all the fields correctly, but then get new 
> error messages they've never seen before.  I'd like to correct this 
> before Validator freezes for a release, but I want to make sure no one 
> really really thinks that the current behavior is somehow the right 
> one.  So please vote:
> 
> +1 = Change Validator so that this doesn't occur
> 0 = I don't give a hoot
> -1 = I really like the way it works now (please give a reason)
> 
> I'm sending this both to Commons and Struts because both communities are 
> impacted by the change.
> 
> James




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: VOTE: Behavior of Validator

2002-09-19 Thread Dave Derry

- Original Message -
From: "James Turner" <[EMAIL PROTECTED]>


>
> Precisely.  Validation for a field should stop on the first error *for
that
> field*
>
> James
>

+1
I agree whole-heartedly with this. The way the Validator currently works is
to iterate throught the validation rules, and for each rule iterate through
the fields to locate those that depend on that rule. This seems wasteful to
me. I think a better way would be to iterate through the list of fields, and
for each field execute the validation methods for that field. This should
accomplish what you state above.

Dave D


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: VOTE: Behavior of Validator

2002-09-19 Thread James Turner

At 02:02 PM 9/19/2002, Dominique Plante wrote:
>+1
>
>Good example, and I agree with your rationale.
>
>Under the new behavior following the example you gave for the second
>case:
>username=blank, password=god: one error generated on "required"
>
>Two errors should be generated:
>username is required
>password cannot be god
>
>Is the new behavior that you want to have happen?

Precisely.  Validation for a field should stop on the first error *for that 
field*

James

>Dominique
>
>
>-Original Message-
>From: James Turner [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 19, 2002 10:41 AM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: VOTE: Behavior of Validator
>
>As currently written, the Validator has what I consider a quirk.
>
>Suppose you have two fields, username and password.  Username has
>"depends=required" and password has "depends=required.notgod" (where
>notgod
>is a test that makes sure that the user didn't choose god as a
>password).  The following behavior occurs:
>
>username=blank, password=blank: two errors generated on "required"
>username=blank, password=god: one error generated on "required"
>username=george, password=god: one error genereated on "notgod"
>
>This is because the Validator won't look at notgod until *all* fields
>pass
>the "required" test.
>
>I think this is a broken behavior.  It leads to web forms where the user
>
>thinks that they've filled in all the fields correctly, but then get new
>
>error messages they've never seen before.  I'd like to correct this
>before
>Validator freezes for a release, but I want to make sure no one really
>really thinks that the current behavior is somehow the right one.  So
>please vote:
>
>+1 = Change Validator so that this doesn't occur
>0 = I don't give a hoot
>-1 = I really like the way it works now (please give a reason)
>
>I'm sending this both to Commons and Struts because both communities are
>
>impacted by the change.
>
>James
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: VOTE: Behavior of Validator

2002-09-19 Thread Christopher Seekamp

   

   

   



+1 definitely

Chris Seekamp




|-+>
| |   James Turner |
| |   |
| ||
| |   09/19/2002 01:40 |
| |   PM   |
| |   Please respond to|
| |   "Struts  |
| |   Developers List" |
| ||
|-+>
  
>-|
  |
 |
  |   To:   [EMAIL PROTECTED] 
 |
  |   cc:   [EMAIL PROTECTED]  
 |
  |       Subject:  VOTE: Behavior of Validator
 |
  |
 |
  |
 |
  
>-|



As currently written, the Validator has what I consider a quirk.

Suppose you have two fields, username and password.  Username has
"depends=required" and password has "depends=required.notgod" (where notgod

is a test that makes sure that the user didn't choose god as a
password).  The following behavior occurs:

username=blank, password=blank: two errors generated on "required"
username=blank, password=god: one error generated on "required"
username=george, password=god: one error genereated on "notgod"

This is because the Validator won't look at notgod until *all* fields pass
the "required" test.

I think this is a broken behavior.  It leads to web forms where the user
thinks that they've filled in all the fields correctly, but then get new
error messages they've never seen before.  I'd like to correct this before
Validator freezes for a release, but I want to make sure no one really
really thinks that the current behavior is somehow the right one.  So
please vote:

+1 = Change Validator so that this doesn't occur
0 = I don't give a hoot
-1 = I really like the way it works now (please give a reason)

I'm sending this both to Commons and Struts because both communities are
impacted by the change.

James



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]
>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
>





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: VOTE: Behavior of Validator

2002-09-19 Thread Dominique Plante

+1

Good example, and I agree with your rationale.

Under the new behavior following the example you gave for the second
case:
username=blank, password=god: one error generated on "required"

Two errors should be generated:
username is required
password cannot be god

Is the new behavior that you want to have happen?

Dominique


-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 19, 2002 10:41 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: VOTE: Behavior of Validator

As currently written, the Validator has what I consider a quirk.

Suppose you have two fields, username and password.  Username has 
"depends=required" and password has "depends=required.notgod" (where
notgod 
is a test that makes sure that the user didn't choose god as a 
password).  The following behavior occurs:

username=blank, password=blank: two errors generated on "required"
username=blank, password=god: one error generated on "required"
username=george, password=god: one error genereated on "notgod"

This is because the Validator won't look at notgod until *all* fields
pass 
the "required" test.

I think this is a broken behavior.  It leads to web forms where the user

thinks that they've filled in all the fields correctly, but then get new

error messages they've never seen before.  I'd like to correct this
before 
Validator freezes for a release, but I want to make sure no one really 
really thinks that the current behavior is somehow the right one.  So 
please vote:

+1 = Change Validator so that this doesn't occur
0 = I don't give a hoot
-1 = I really like the way it works now (please give a reason)

I'm sending this both to Commons and Struts because both communities are

impacted by the change.

James



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




VOTE: Behavior of Validator

2002-09-19 Thread James Turner

As currently written, the Validator has what I consider a quirk.

Suppose you have two fields, username and password.  Username has 
"depends=required" and password has "depends=required.notgod" (where notgod 
is a test that makes sure that the user didn't choose god as a 
password).  The following behavior occurs:

username=blank, password=blank: two errors generated on "required"
username=blank, password=god: one error generated on "required"
username=george, password=god: one error genereated on "notgod"

This is because the Validator won't look at notgod until *all* fields pass 
the "required" test.

I think this is a broken behavior.  It leads to web forms where the user 
thinks that they've filled in all the fields correctly, but then get new 
error messages they've never seen before.  I'd like to correct this before 
Validator freezes for a release, but I want to make sure no one really 
really thinks that the current behavior is somehow the right one.  So 
please vote:

+1 = Change Validator so that this doesn't occur
0 = I don't give a hoot
-1 = I really like the way it works now (please give a reason)

I'm sending this both to Commons and Struts because both communities are 
impacted by the change.

James



--
To unsubscribe, e-mail:   
For additional commands, e-mail: