Magento installation problem – Please enter a valid URL. Protocol is required

Magento installation problem – Please enter a valid URL. Protocol is required

While installing Magento on localhost, you may get stuck at the Step 2 of the Installation screen, which doesn’t let you go further at all.

Its about the URL field, which keeps on giving this error,

Please enter a valid URL. Protocol is required (http://, https:// or ftp://)

There are two method to solve this common issue.

First Method:

Replace line no. #500 to #503 in \magento-1.4.2.0\js\prototype\validation.js file by code below:
[‘validate-url’, ‘Please enter a valid URL. Protocol is required (http://, https:// or ftp://)’, function (v) {
//return Validation.get(‘IsEmpty’).test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
return true;
}],

For Version Magento 1.5 +
You would need to replace lines #505 to #507 from file \magento\js\prototype\validation.js

Second Method:

So, here is a second workaround for it.

  • Install Firebug Addon on your Firefox Browser.
  • While you are on that installation screen, just click on your URL field and then right click.
  • Click on INSPECT ELEMENT.
  • This will open the Firebug screen and highlight the html code of that field.
  • You will see it has something like class=”validate-url”.
  • Just remove that validate-url, so the class becomes blank and looks like class=””
  • Now, just click on SUBMIT and you are done.
DOWNLOAD SOLUTION HERE