I have registration form in which there are name, email, etc fields. In email field when I type ** email@yahoo.co ** it is accepted. But in real it is wrong because email@yahoo.co ** is not end with m. It should be **email@yahoo.com.
Is there any way to validate it, so that it only accept email which is ended with .com and in which there is @.
view/register:
<?php
echo $this->form()->openTag($form);
?>
<dl class="zend_form">
<dt><?php echo $this->formLabel($form->get('name')); ?></dt>
<dd><?php
echo $this->formElement($form->get('name'));
echo $this->formElementErrors($form->get('name'));
?></dd>
<dt><?php echo $this->formLabel($form->get('email')); ?></dt>
<dd><?php
echo $this->formElement($form->get('email'));
echo $this->formElementErrors($form->get('email'));
?></dd>
<dt><?php echo $this->formLabel($form->get('password')); ?></dt>
<dd><?php
echo $this->formElement($form->get('password'));
echo $this->formElementErrors($form->get('password'));
?></dd>
<dt><?php echo $this->formLabel($form->get('confirm_password')); ?></dt>
<dd><?php
echo $this->formElement($form->get('confirm_password'));
echo $this->formElementErrors($form->get('confirm_password'));
?></dd>
<br/>
<dd><?php
echo $this->formElement($form->get('submit'));
echo $this->formElementErrors($form->get('submit'));
?></dd>
</dl>
<?php echo $this->form()->closeTag() ?>
Thanks in advance