You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jian Dai <ja...@comcast.net> on 2003/10/25 18:16:31 UTC

Form Validation

Hi, all,

I have a problem with I use form validation logical sheet. 

I set up a descriptor file and constraint set. In my form, I 
have every parameters in constraint set validated. But I still
get <form-value:notpresent-error /> in general form. (If I define a
name, than I do not have such error. 

Is there anybody has a clue about it?

Many thanks in advance for the nice help. 

Jack


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Form Validation

Posted by Jian Dai <ja...@comcast.net>.
Hi, Christ:

Here attached a sample of my problem. 

Here is the decription file

++++++++++++++++++++

<?xml version="1.0"?>

<root>
  <parameter name="username" type="string" max-len="30"
     nullable="no"/>
  <parameter name="password" type="string" max-len="30"
     nullable="no"/>

  <constraint-set name="check">
   <validate name="username"/>
   <validate name="password"/>
  </constraint-set>
</root>


++++++++++++++++++++

This is a simple login form, I have two fields (username and password). 
If I gave the validate value for this two fields, I expect
<form-val:is-error /> return false. But actually I had are
<form-val:is-error name="username" /> return false (no error) and 
<form-val:is-error name="password" /> return false (no error) but
<form-val:is-error /> return true (has ERROR!). 

I did further search and found <form-val:notpresent /> return true in 
this case. 

Since I only have two attributes in this case, I do not know why I was 
in such a weird situation. 

Many thanks in advance for nice help. 

Jian

-----Original Message-----
From: Christian Haul [mailto:haul@informatik.tu-darmstadt.de]
Sent: Sunday, October 26, 2003 5:45 AM
To: users@cocoon.apache.org
Subject: Re: Form Validation


Jian Dai wrote:
> Hi, all,
> 
> I have a problem with I use form validation logical sheet. 
> 
> I set up a descriptor file and constraint set. In my form, I 
> have every parameters in constraint set validated. But I still
> get <form-value:notpresent-error /> in general form. (If I define a
> name, than I do not have such error. 
> 
> Is there anybody has a clue about it?

Could you post a sample that shows the problem? (input, output + 
expected output)

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Form Validation

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Jian Dai wrote:
> Hi, all,
> 
> I have a problem with I use form validation logical sheet. 
> 
> I set up a descriptor file and constraint set. In my form, I 
> have every parameters in constraint set validated. But I still
> get <form-value:notpresent-error /> in general form. (If I define a
> name, than I do not have such error. 
> 
> Is there anybody has a clue about it?

Could you post a sample that shows the problem? (input, output + 
expected output)

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org