Anton Shestakov <av6@dwimlabs.net>, Sun, 20 Mar 2016 11:43:20 +0800
coffee: create Tram namespace, put config there
js/ui/validation.js
Permissions: -rw-r--r--
// Generated by CoffeeScript 1.10.0 Validation = (function() { Validation.prototype.setError = function($field, message) { $el = $('<div class="uk-text-danger"></div>').text(message); $field.addClass('uk-form-danger'); return $field.after($el); Validation.prototype.unsetError = function($field) { return $field.removeClass('uk-form-danger').siblings('.uk-text-danger').remove(); Validation.prototype.validateRequired = function(field, trim) { this.setError($field, 'This field is required.'); Validation.prototype.validatePasswords = function(field1, field2) { if ($field1.val() !== $field2.val()) { this.setError($field2, 'Passwords must match.'); window.validation = new Validation(); //# sourceMappingURL=validation.js.map