Skip to content

Commit

Permalink
Made forms.js "constants" consistent with other source files
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Mar 18, 2011
1 parent 45b674a commit 6fa73dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/forms.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/** Property under which non-field-specific errors are stored. */
var NON_FIELD_ERRORS = '__all__';

/**
* A field and its associated data.
*
Expand Down Expand Up @@ -309,9 +312,6 @@ function BaseForm(kwargs)
*/
}

/** Property under which non-field-specific errors are stored. */
BaseForm.NON_FIELD_ERRORS = '__all__';

BaseForm.prototype =
{
/**
Expand Down Expand Up @@ -762,7 +762,7 @@ BaseForm.prototype.asP = (function()
*/
BaseForm.prototype.nonFieldErrors = function()
{
return (this.errors(BaseForm.NON_FIELD_ERRORS) || new this.errorConstructor());
return (this.errors(NON_FIELD_ERRORS) || new this.errorConstructor());
};

/**
Expand Down Expand Up @@ -867,7 +867,7 @@ BaseForm.prototype._cleanForm = function()
{
if (!(e instanceof ValidationError))
throw e;
this._errors.set(BaseForm.NON_FIELD_ERRORS,
this._errors.set(NON_FIELD_ERRORS,
new this.errorConstructor(e.messages));
}
};
Expand Down

0 comments on commit 6fa73dd

Please sign in to comment.