Magento installation, validation(valid URL) problem/error

There is a validation problem arise when I try to install Magento in my localhost at the filed Base URL and showing message “Please enter a valid URL. Protocol is required(http://, https:// or ftp://)“.

Yes, everything is ok there, but to solve this problem you have to block/comment few lines of code

['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)
}],

To

/*  ['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)
}], */

at (line# 505) validation.js in YourSiteName\js\prototype\ folder. Just block/comment the above code and continue. 🙂

Advertisements