Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 1fd7c138630d11eb98fc489d15a922c7315b581a 1 parent c903ad7
Bertrand Mansion golgote authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 data/js/quickform.js
22 data/js/quickform.js
View
@@ -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
*/
Please sign in to comment.
Something went wrong with that request. Please try again.