validate($_GET)){ $form->triggerCustomError('test[email][weird_name_just_to_prove_it_works]','Validation successful, custom error triggered.'); } }else{ $form->setValues(array( 'test' => array ( 'email' => array ( 'weird_name_just_to_prove_it_works' => 'validemail@test.com', 'repeated' => 'validemail@test.com', ), 'type_email' => 'validemail@test.com', 'password' => 'asdf', 'repeat_password' => 'asdf', ), 'a_radio_button' => 'något annat', 'foo' => array ( 'bar' => 'some_value', ), 'a_list' => 'ett konstigt värde', 'area' => 'ett konstigt värde', )); } ?> An example - SimpleFormValidator

An example

In this example I use GET instead of POST. This makes it easier to manipulate values and trigger errors.

I also have words in Swedish to test unicode characters, as well as a weird variable structure.

(The form has the novalidate attribute, to ensure server side validation only.)

html(); ?>