Sha256: d28d7799ffd2a62c5b90fb7022ba07c3ec26ec080109d3d43cc0c484d3a87131
Contents?: true
Size: 1.15 KB
Versions: 3
Compression:
Stored size: 1.15 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.Absence = (function(superClass) { extend(Absence, superClass); function Absence() { Absence.__super__.constructor.apply(this, arguments); } Absence.prototype.validate = function() { switch (typeof this.val) { case 'string': if ((this.val != null) && this.val.length === 0) { return; } break; default: if (this.val == null) { return; } } return this._addErrorMessage(); }; Absence.prototype._addErrorMessage = function() { var message; message = App.I18n[App.Env.loco.getLocale()].errors.messages.present; return this.obj.addErrorMessage(message, { "for": this.attr }); }; return Absence; })(App.Validators.Base); }).call(this); :ET
Version data entries
3 entries across 3 versions & 1 rubygems