Permalink
Browse files

Fix the ‘SyntaxError: <unknown message reserved_word>’ error

  • Loading branch information...
1 parent a21624a commit 0811f2fa433523b4df1966c7b06934e11e3fc443 @Baggz committed Mar 15, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/engines/json/validationError.js
@@ -3,25 +3,25 @@
*
* @constructor
*/
-var ValidationError = function(super) {
+var ValidationError = function(parent) {
this.length = 0;
- this.super = super;
- this.errorMessages = this.super.errorMessages;
+ this.parent = parent;
+ this.errorMessages = this.parent.errorMessages;
};
ValidationError.prototype.renderErrorMessage = function(error) {
var errorMessage = this.errorMessages[error.attributeName];
- if (errorMessage && isFunction(errorMessage) {
+ if (errorMessage && isFunction(errorMessage)) {
return errorMessage(
error.property,
error.propertyValue,
error.attributeValue
);
}
- if (errorMessage && isString(errorMessage) {
+ if (errorMessage && isString(errorMessage)) {
[
'property',
@@ -32,7 +32,7 @@ ValidationError.prototype.renderErrorMessage = function(error) {
});
// Deprecated
- errorMessage = errorMessage.replace(/{{validator}}/, 'g'), error['attributeValue']);
+ errorMessage = errorMessage.replace(/{{validator}}/g, error['attributeValue']);
return errorMessage.replace(/\s+/g, ' ');

0 comments on commit 0811f2f

Please sign in to comment.