Sha256: f5d4cff02c2d5b2d048a898322607fa3cfdb1d09b63f0e10426d61cb88902ad0
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
I"ø(function() { var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; App.Validators.Vulgarity = (function(superClass) { extend(Vulgarity, superClass); function Vulgarity() { Vulgarity.__super__.constructor.apply(this, arguments); } Vulgarity.prototype.validate = function() { if (this.val == null) { return; } switch (typeof this.val) { case 'string': if (/fuck/i.exec(this.val)) { return this._addErrorMessage(); } else { } break; default: throw new TypeError("Vulgarity validator is applicable only for strings and " + this.attr + " isn't."); } }; Vulgarity.prototype._addErrorMessage = function() { var message; message = App.I18n[App.Env.loco.getLocale()].errors.messages.vulgarity; return this.obj.addErrorMessage(message, { "for": this.attr }); }; return Vulgarity; })(App.Validators.Base); }).call(this); :ET
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
loco-rails-0.0.1 | test/dummy/tmp/cache/assets/development/sprockets/v3.0/58XzQNwS45YBb-wZ_K7qHPVyDccaj85Dl9DQnrHW530.cache |