I have developed a custom login form without using CMD prompt and it does not have any relation with database.
I just want to validate it.I have applied the validators on username as 'name' => new sfValidatorEmail(),
.The isValid function in the action working fine but how can i display the errors in Template file.
My Template code look like ,
<?php echo $form ?>
echo $form->renderGlobalErrors();
will output any global errors (such as security token errors), but not ones specific to a field (EG "this field is required" or "this field needs to be a 7 digit number"). I believe field specific errors are output when you render the whole form, but you can use echo $form['field']->renderError()
to output the error for a specific field.
You should read trough the chapter Forms for web Designers on the symfony website.
To display all errors you could use...
echo $form->renderGlobalErrors();