Validator.js revision 2d7019e19039fd083850f76e54b6b26a7b06a8f2
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright © 2011 ForgeRock AS. All rights reserved.
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*/
/*global $, define*/
/**
* @author mbilski
*/
[],
function() {
this.okFields = [];
this.ok = false;
this.conditions = conditions;
this.init();
};
ok: null,
inputs: null,
conditions: null,
callback: null,
eventType: null,
mode: null,
required: null
};
var r, i;
if( this.mode === 'simple' ) {
return this.ok;
} else {
r = true;
r = false;
}
}
return r;
}
};
var l;
this.validateField(this.inputs[l]);
}
};
this.ok = true;
this.callback();
return;
}
if( result === 'delegate' ) {
remove = false;
break;
}
if( this.mode === 'simple' ) {
if(result) {
remove = false;
break;
}
} else {
if(!result) {
} else {
remove = false;
}
}
}
this.removeError(input);
this.simpleRemoveError(input);
this.removeError(input);
} else if( this.mode !== 'simple' && remove === false && this.inputs[0].val() === $(input).val() ) {
}
};
var i, forOneInput, self = this;
forOneInput = function() {
self.validateField(this);
};
}
if( this.mode !== 'simple' ) {
}
}
};
var i, self = this;
}
};
if( $(input).parent().find('span').first().hasClass('error') || !$(input).parent().find('span').first().hasClass('ok')) {
}
};
if( $(input).parent().find('span').hasClass('ok') || !$(input).parent().find('span').hasClass('error')) {
}
};
this.ok = true;
this.callback();
};
this.ok = false;
this.callback();
};
$(input).parent().parent().parent().find(".groupFieldErrors").find("#"+name).prev('span').html('✔');
$(input).parent().parent().parent().find(".groupFieldErrors").find("#"+name).prev('span').removeClass('error');
$(input).parent().parent().parent().find(".groupFieldErrors").find("#"+name).prev('span').addClass('ok');
this.callback();
};
$(input).parent().parent().parent().find(".groupFieldErrors").find("#"+name).prev('span').html('x');
$(input).parent().parent().parent().find(".groupFieldErrors").find("#"+name).prev('span').removeClass('ok');
$(input).parent().parent().parent().find(".groupFieldErrors").find("#"+name).prev('span').addClass('error');
this.callback();
};
};
return obj;
});