[PHPLIB] altering validate() From: Alan Lee (alee <email protected>)
Date: 11/11/99

I am trying to adapt oohforms.inc's validate() into a new function that
I can use with form elements that have array values so that I can use
the error message to tell the user which element of the array of values
was no good.

I want $f->arrayvalidate() to return $err as an array:
     $err = array( position of element that was invalid, errormessage );

so when a form is set up like:
   $f->add_element(array("type"=>"text",
                         "name"=>"xxx",
                         "multiple" => 1));

and the webpage displays like:

Enter 3 Titles: (form name=xxx[] type=text)_____
                 (form name=xxx[] type=text)_____
                 (form name=xxx[] type=text)_____

I can validate and get an error message that can tell the user:
     "Your 3rd entry for Titles is invalid".

Im smart enough to describe the problem, but not smart enough to solve
it.
Anyone want to help?

I'll volunteer to answer all the "Header information already sent"
questions for a month!

Allen
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.