Sha256: 0addf56d74158de22bc3656992d23490fb919e870e344a34fd07dd434774ec63
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 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.Format = (function(superClass) { extend(Format, superClass); function Format() { Format.__super__.constructor.apply(this, arguments); } Format.prototype.validate = function() { var match; match = this.opts["with"].exec(this.val); if (match != null) { return; } return this._addErrorMessage(); }; Format.prototype._addErrorMessage = function() { var message; message = this.opts.message != null ? this.opts.message : App.I18n[App.Env.loco.getLocale()].errors.messages.invalid; return this.obj.addErrorMessage(message, { "for": this.attr }); }; return Format; })(App.Validators.Base); }).call(this); :ET
Version data entries
3 entries across 3 versions & 1 rubygems