Sha256: e4c1cef0072dd52ba3ae18f7f6d63641bf06cd1b0d71c5b22c421588289a160a
Contents?: true
Size: 986 Bytes
Versions: 4
Compression:
Stored size: 986 Bytes
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.Presence = (function(superClass) { extend(Presence, superClass); function Presence() { Presence.__super__.constructor.apply(this, arguments); } Presence.prototype.validate = function() { if ((this.val != null) && this.val.length > 0) { return true; } this._addErrorMessage(); return false; }; Presence.prototype._addErrorMessage = function() { var message; message = "can't be blank"; return this.obj.addErrorMessage(message, { "for": this.attr }); }; return Presence; })(App.Validators.Base); }).call(this); :ET
Version data entries
4 entries across 4 versions & 1 rubygems