Some of us may not want the validation advice that is given, and prefer to just use CSS styling.
Here is how to remove it:
in /js/prototype/validation.js
Here is how to remove it:
in /js/prototype/validation.js
test : function(name, elm, useTitle) {
var v = Validation.get(name);
var prop = '__advice'+name.camelize();
try {
if(Validation.isVisible(elm) && !v.test($F(elm), elm)) {
//if(!elm[prop]) {
/*
var advice = Validation.getAdvice(name, elm);
if (advice == null) {
advice = this.createAdvice(name, elm, useTitle);
}
this.showAdvice(elm, advice, name);
*/
//}
elm[prop] = 1;
elm.removeClassName('validation-passed');
elm.addClassName('validation-failed');
return false;
} else {
//var advice = Validation.getAdvice(name, elm);
//this.hideAdvice(elm, advice);
elm[prop] = '';
elm.removeClassName('validation-failed');
elm.addClassName('validation-passed');
return true;
}
} catch(e) {
throw(e)
}
},
hanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well.this was actually what i was looking for,and i am glad to came here!
ReplyDeletemagento development company in bangalore