
Ludwig Ruderstaller - 2008-03-10 14:13:49 -
In reply to message 2 from Manuel Lemos
Hi,
> "ValidateOnlyOnServerSide"
Its not a problem at the moment, i extend your class and have overwritten you AddInput function which adds the "ValidateOnlyOnServerSide" followed bei parent::AddInput.
> ShowAllErrors=1
Yes, i already did this. Unfortunatly its only a string. For the "Empty" Validation message, its no big problem to parse the right line depending on the label name. For other Errormessages it could be harder.
The only option i see for the moment is to overwrite the Validate function and write $input_error to an array. eg.
$input_errors[$field]=$input_error;
Maybe you want to add an FormClass Var. eg. ErrorsAsArray which defaults to false to keep backward compatibility. so you could at the end of Validate() do eg.
[php]
if($this->ErrorsAsArray){
return $input_errors;
}else{
if($this->ShowAllErrors){
$error=implode($input_errors,$suffix);
}else{
$error=$suffix.end($input_errors).$prefix;
}
return $error;
}
[/php]
what you think ?
Rufinus aka Ludwig