I'm having a little bit of a problem getting the hang of validation, I think
I'm still thinking in Pear QuickForm mindset.
I have the following code:
// create form code
if( $admin->form->isValid( $_POST ) ) {
echo $admin->savePrimarySource( $admin->form->getValues() );
}
else {
echo $admin->form->render();
}
When I first load this page, I get the validation errors. My thought was
that it would detect whether or not the form has been POSTed or not . but
I'm guessing it's just looking at what's in $_POST (which is nothing) and
says hey your required fields are missing. What's a good way to validate a
whole form in this fashion?
Thanks, Mark