cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nuno Miguel Borges Leong <nuno.le...@praxia.pt>
Subject Re: [Fwd: form validation]
Date Thu, 11 Sep 2003 14:28:23 GMT
Hey Peter,

We had a similar problem with form-validation. Our form had two textboxes, and 
we wanted to submit only if at least one textbox was filled. There is no native 
form validator action to perform this validation so we decided to implement it 
ourselves.

Basically, you'll need to browse through the form-validator logicsheet and the 
action classes associated:

(these path's are based of the cocoon source)
src/java/org/apache/cocoon/acting/ValidatorActionResult.java
src/java/org/apache/cocoon/acting/ValidatorActionHelper.java
src/java/org/apache/cocoon/acting/AbstractValidatorAction.java
src/java/org/apache/cocoon/acting/FormValidatorAction.java (not sure if changes 
are necessary on this one)

src/java/org/apache/cocoon/components/language/markup/xsp/XSPFormValidatorHelper.
java

src/java/org/apache/cocoon/components/language/markup/xsp/java/form-validator.
xsl

We just upgraded to cocoon2.1, and i'm going to re-implement the changes.
If you want more details contact me, and i'll send you the sources.

Regards
-- 
Nuno Leong
Práxia SI


Quoting Peter Choe <choepete@mindspring.com>:

> 
> 
> i want to validate a form using form validation.  i can the validation 
> to work if it checks to see if each field enter matches the criteria, 
> but i would like a validation that checks a conditional.
> 
> for example:
> 
> if a person doesn't check one check box, i want to check if a text box 
> has a certain number of characters
> 
> else if the check box is selected, the number of characters in the text 
> box doesn't matter.
> 
> is there a way to do this through cocoon form validation?
> 
> i am using cocoon 2.0 for now.
> 
> Peter
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

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


Mime
View raw message