
 Ludwig Ruderstaller - 2005-09-06 12:30:22
Hi,
First I want to thank you for your class. I extended it a bit to work better with smarty. (generating the smarty template on the fly with a "stream" resource.)
I have a lot of forms which have fields which are optional. But if something is entered in this fields they should be validated. I didnt find anything in the documentation. 
For example (taken from your test_form.php)
	$form->AddInput(array(
		"TYPE"=>"text",
		"NAME"=>"email",
		"ID"=>"email",
		"MAXLENGTH"=>100,
		"Capitalization"=>"lowercase",
		"ValidateAsEmail"=>1,
		"ValidationErrorMessage"=>"It was not specified a valid e-mail address",
		"LABEL"=>"<u>E</u>-mail address",
		"ACCESSKEY"=>"E"
	));
This field has to be inserted a valid emailadress. Its not valid if its empty. So i want to make a field which is optional, but has to be a valid email if text is entered.
tia
Rufinus