RE: More Validation Problems

2003-07-03 Thread Kamholz, Keith (corp-staff) USX
Does the required option of the validator check to see if the field is null
or an empty string?  Maybe this is why my validations have been passing when
they shouldn't, because I initialize all my properties to .
I hope I've finally found my problem!

- Keith


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 5:20 PM
To: Struts Users Mailing List
Subject: Re: More Validation Problems


wait til you graduate onto struts validator, you'll have a ball then ;)

Nathan Ewing wrote:
 Omg I figured it out :)
 
 In my validation, to see if someone had filled in a required field I was
 checking to see if the field was null.  Because of this whenever the form
 displayed the bean would be created with null fields and errors would
display. 
 Then when I hit submit it would make the blank field  instead of null so
I
 wouldn't get an error :)
 
Nathan
 
 
 --- Nathan Ewing [EMAIL PROTECTED] wrote:
 
Well I figured out why I was getting a validation error.  I was returning
a
null error if there were no errors.

Unfortunately now I find my real problem.

My form shows correctly (more or less), but if I hit submit instead of
just
popping back up with validation errors it goes to the Action class behind
it.

Shouldn't it by default show my form, then if I enter wrong data just show
the
form again with the errors, and then if it passes with no errors it should
go
to the action class for processing?

   Nathan



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

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


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

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



Re: More Validation Problems

2003-07-03 Thread Adam Hardy
Yes it does. Both. How can your initialization affect validation though? 
In your case freshly initialized properties would fail validation.

Adam

Kamholz, Keith (corp-staff) USX wrote:
Does the required option of the validator check to see if the field is null
or an empty string?  Maybe this is why my validations have been passing when
they shouldn't, because I initialize all my properties to .
I hope I've finally found my problem!
- Keith

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 5:20 PM
To: Struts Users Mailing List
Subject: Re: More Validation Problems
wait til you graduate onto struts validator, you'll have a ball then ;)

Nathan Ewing wrote:

Omg I figured it out :)

In my validation, to see if someone had filled in a required field I was
checking to see if the field was null.  Because of this whenever the form
displayed the bean would be created with null fields and errors would
display. 

Then when I hit submit it would make the blank field  instead of null so
I

wouldn't get an error :)

  Nathan

--- Nathan Ewing [EMAIL PROTECTED] wrote:


Well I figured out why I was getting a validation error.  I was returning
a

null error if there were no errors.

Unfortunately now I find my real problem.

My form shows correctly (more or less), but if I hit submit instead of
just

popping back up with validation errors it goes to the Action class behind
it.

Shouldn't it by default show my form, then if I enter wrong data just show
the
form again with the errors, and then if it passes with no errors it should
go

to the action class for processing?

 Nathan



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


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



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



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


Re: More Validation Problems

2003-07-03 Thread David Graham

 Kamholz, Keith (corp-staff) USX wrote:
  Does the required option of the validator check to see if the field is
 null
  or an empty string?  

The field is first stripped of all leading and trailing whitespace.  If
the field is null or  the required validation will fail.

David

 Maybe this is why my validations have been
 passing when
  they shouldn't, because I initialize all my properties to .
  I hope I've finally found my problem!
  
  - Keith
  
  
  -Original Message-
  From: Adam Hardy [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 02, 2003 5:20 PM
  To: Struts Users Mailing List
  Subject: Re: More Validation Problems
  
  
  wait til you graduate onto struts validator, you'll have a ball then
 ;)
  
  Nathan Ewing wrote:
  
 Omg I figured it out :)
 
 In my validation, to see if someone had filled in a required field I
 was
 checking to see if the field was null.  Because of this whenever the
 form
 displayed the bean would be created with null fields and errors would
  
  display. 
  
 Then when I hit submit it would make the blank field  instead of
 null so
  
  I
  
 wouldn't get an error :)
 
Nathan
 
 
 --- Nathan Ewing [EMAIL PROTECTED] wrote:
 
 
 Well I figured out why I was getting a validation error.  I was
 returning
  
  a
  
 null error if there were no errors.
 
 Unfortunately now I find my real problem.
 
 My form shows correctly (more or less), but if I hit submit instead
 of
  
  just
  
 popping back up with validation errors it goes to the Action class
 behind
  
  it.
  
 Shouldn't it by default show my form, then if I enter wrong data just
 show
 the
 form again with the errors, and then if it passes with no errors it
 should
  
  go
  
 to the action class for processing?
 
   Nathan
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: More Validation Problems

2003-07-02 Thread Nathan Ewing
Omg I figured it out :)

In my validation, to see if someone had filled in a required field I was
checking to see if the field was null.  Because of this whenever the form
displayed the bean would be created with null fields and errors would display. 
Then when I hit submit it would make the blank field  instead of null so I
wouldn't get an error :)

   Nathan


--- Nathan Ewing [EMAIL PROTECTED] wrote:
 Well I figured out why I was getting a validation error.  I was returning a
 null error if there were no errors.
 
 Unfortunately now I find my real problem.
 
 My form shows correctly (more or less), but if I hit submit instead of just
 popping back up with validation errors it goes to the Action class behind it.
 
 Shouldn't it by default show my form, then if I enter wrong data just show
 the
 form again with the errors, and then if it passes with no errors it should go
 to the action class for processing?
 
Nathan
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: More Validation Problems

2003-07-02 Thread Adam Hardy
wait til you graduate onto struts validator, you'll have a ball then ;)

Nathan Ewing wrote:
Omg I figured it out :)

In my validation, to see if someone had filled in a required field I was
checking to see if the field was null.  Because of this whenever the form
displayed the bean would be created with null fields and errors would display. 
Then when I hit submit it would make the blank field  instead of null so I
wouldn't get an error :)

   Nathan

--- Nathan Ewing [EMAIL PROTECTED] wrote:

Well I figured out why I was getting a validation error.  I was returning a
null error if there were no errors.
Unfortunately now I find my real problem.

My form shows correctly (more or less), but if I hit submit instead of just
popping back up with validation errors it goes to the Action class behind it.
Shouldn't it by default show my form, then if I enter wrong data just show
the
form again with the errors, and then if it passes with no errors it should go
to the action class for processing?
  Nathan



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


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



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