Permalink
Browse files

Moves javascript css classes of the validator to the prototype.

git-svn-id: http://svn.php.net/repository/pear/packages/HTML_QuickForm2/trunk@326104 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent c903ad7 commit 1fd7c138630d11eb98fc489d15a922c7315b581a @golgote golgote committed Jun 11, 2012
Showing with 11 additions and 11 deletions.
  1. +11 −11 data/js/quickform.js
View
22 data/js/quickform.js
@@ -860,17 +860,6 @@ qf.Validator = function(form, rules)
*/
this.errors = new qf.Map();
- /**
- * CSS classes to use when marking validation status
- * @type {Object}
- */
- this.classes = {
- error: 'error',
- valid: 'valid',
- message: 'error',
- ancestor: 'element'
- };
-
form.validator = this;
qf.events.addListener(form, 'submit', qf.Validator.submitHandler);
@@ -917,6 +906,17 @@ qf.Validator.liveHandler = function(event)
qf.Validator.prototype = {
/**
+ * CSS classes to use when marking validation status
+ * @type {Object}
+ */
+ classes: {
+ error: 'error',
+ valid: 'valid',
+ message: 'error',
+ ancestor: 'element'
+ },
+
+ /**
* Called before starting the validation. May be used e.g. to clear the errors from form elements.
* @param {HTMLFormElement} form The form being validated currently
*/

0 comments on commit 1fd7c13

Please sign in to comment.