Skip to content
Browse files

Reverted advice

  • Loading branch information...
1 parent 678bb98 commit de14e8542a4c30eae2b3c0b9112eeffe9f7edec8 Nathan Smith committed Jun 18, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 validation.js
View
4 validation.js
@@ -86,8 +86,8 @@ Validation.prototype = {
var useTitles = this.options.useTitles;
var callback = this.options.onElementValidate;
Form.getElements(this.form).each(function(input) { // Thanks Mike!
-
Event.observe(input, 'blur', function(ev) { Validation.validate(Event.element(ev),{useTitle : useTitles, onElementValidate : callback}); });
+ // Keyup and change handlers added by Smith
Event.observe(input, 'keyup', function(ev) {
var KEY_SHIFT_TAB = 16,
isTab = ev.keyCode === Event.KEY_TAB ||
@@ -149,7 +149,7 @@ Object.extend(Validation, {
var advice = Validation.getAdvice(name, elm);
if(advice == null) {
var errorMsg = useTitle ? ((elm && elm.title) ? elm.title : v.error) : v.error;
- advice = '<span class="error" id="advice-' + name + '-' + Validation.getElmID(elm) +'" style="display:none">' + errorMsg + '</span>'
+ advice = '<div class="validation-advice" id="advice-' + name + '-' + Validation.getElmID(elm) +'" style="display:none">' + errorMsg + '</div>'
switch (elm.type.toLowerCase()) {
case 'checkbox':
case 'radio':

0 comments on commit de14e85

Please sign in to comment.
Something went wrong with that request. Please try again.