An array where you can specify an error message for the individual fields within your form during pre-processing.
Parameters | |
---|
Array | $errors = array('fieldName'=>'Error message', 'fieldName2'=>'Error message 2'); |
$t->fetch("[http://yourwebsite");]
$t->submitForm( "0",
array (
'Address'=> $data['Address'],
'Suburb'=> $data['Suburb'],
'City'=> $data['City'],
'Email'=> $data['email']
'ok' => 'Submit',
)
);
if ($t->contains("This E-mail address has already been registered.")) {
$errors = array('email'=>'This E-mail address has already been registered');