--- a/coffee/validation.coffee Sun Mar 27 12:01:52 2016 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
- setError: ($field, message) ->
- $el = $('<div class="uk-text-danger"></div>').text(message)
- $field.addClass('uk-form-danger')
- unsetError: ($field) ->
- $field.removeClass('uk-form-danger').siblings('.uk-text-danger').remove()
- validateRequired: (field, trim) ->
- val = val.trim() if trim
- @setError $field, 'This field is required.'
- validatePasswords: (field1, field2) ->
- if $field1.val() isnt $field2.val()
- @setError $field2, 'Passwords must match.'
--- a/js/validation.js Sun Mar 27 12:01:52 2016 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
-// Generated by CoffeeScript 1.10.0
- setError: function($field, message) {
- $el = $('<div class="uk-text-danger"></div>').text(message);
- $field.addClass('uk-form-danger');
- return $field.after($el);
- unsetError: function($field) {
- return $field.removeClass('uk-form-danger').siblings('.uk-text-danger').remove();
- validateRequired: function(field, trim) {
- this.setError($field, 'This field is required.');
- validatePasswords: function(field1, field2) {
- if ($field1.val() !== $field2.val()) {
- this.setError($field2, 'Passwords must match.');
-//# sourceMappingURL=validation.js.map
--- a/js/validation.js.map Sun Mar 27 12:01:52 2016 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
- "file": "validation.js",
- "coffee/validation.coffee"
- "mappings": ";AAAA;EAAA,IAAI,CAAC,UAAL,GACE;IAAA,QAAA,EAAU,SAAC,MAAD,EAAS,OAAT;AACR,UAAA;MAAA,GAAA,GAAM,CAAA,CAAE,oCAAF,CAAuC,CAAC,IAAxC,CAA6C,OAA7C;MACN,MAAM,CAAC,QAAP,CAAgB,gBAAhB;aACA,MAAM,CAAC,KAAP,CAAa,GAAb;IAHQ,CAAV;IAKA,UAAA,EAAY,SAAC,MAAD;aACV,MAAM,CAAC,WAAP,CAAmB,gBAAnB,CAAoC,CAAC,QAArC,CAA8C,iBAA9C,CAAgE,CAAC,MAAjE,CAAA;IADU,CALZ;IAQA,gBAAA,EAAkB,SAAC,KAAD,EAAQ,IAAR;AAChB,UAAA;MAAA,MAAA,GAAS,CAAA,CAAE,KAAF;MACT,GAAA,GAAM,MAAM,CAAC,GAAP,CAAA;MACN,IAAoB,IAApB;QAAA,GAAA,GAAM,GAAG,CAAC,IAAJ,CAAA,EAAN;;MACA,IAAG,GAAA,KAAO,EAAV;QACE,IAAC,CAAA,QAAD,CAAU,MAAV,EAAkB,yBAAlB;AACA,eAAO,MAFT;OAAA,MAAA;AAIE,eAAO,KAJT;;IAJgB,CARlB;IAkBA,iBAAA,EAAmB,SAAC,MAAD,EAAS,MAAT;AACjB,UAAA;MAAA,OAAA,GAAU,CAAA,CAAE,MAAF;MACV,OAAA,GAAU,CAAA,CAAE,MAAF;MACV,IAAG,OAAO,CAAC,GAAR,CAAA,CAAA,KAAmB,OAAO,CAAC,GAAR,CAAA,CAAtB;QACE,IAAC,CAAA,QAAD,CAAU,OAAV,EAAmB,uBAAnB;AACA,eAAO,MAFT;OAAA,MAAA;AAIE,eAAO,KAJT;;IAHiB,CAlBnB;;AADF"
\ No newline at end of file