cancel
Showing results for 
Search instead for 
Did you mean: 

remove Email format verification in magento 1.9 during user registration

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

remove Email format verification in magento 1.9 during user registration

Hello all, I want user to provide mobile no. instead of email address in the email field. But due to backend validation of email format its not accepting any string value without "@" and ".com"

I have removed email verification from validation.js. What more needs to be done?

1 REPLY 1

Re: remove Email format verification in magento 1.9 during user registration

Hi Taare,

Let’s create our javascript file and place it in the js folder.
js/custom.js

Validation.add('validate-email', 'Please enter a valid Gmail address. For example johndoe@gmail.com.', function(v) {
// here write your logic
});

All we need to do now is include our validation script. We’ll do that using Magento’s addJs method which will add the javascript file to our website’s head.

<default>
    <reference name="head">
        <action method="addJs"><script>custom.js</script></action>
    </reference>
</default>

 You can do this from any layout file (preferably your module’s layout file), Magento did it in their theme’s layout page called page.xml located in app/design/frontend/base/default/layout/page.xml