This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var concat = require('concat-stream'); | |
process.stdin.pipe(concat(function (data) { | |
var json = JSON.parse(data); | |
var str = JSON.stringify(json, null, 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.validator.addMethod("notequal", function (value, element, param) { | |
if (param.indexOf("#") == -1) return value != param; | |
return value != $(param).val(); | |
}, $.validator.messages.notequal); | |
$.validator.unobtrusive.adapters.add("notequal", ["field"], function (options) { | |
options.rules["notequal"] = options.params.field; | |
if (options.message) options.messages["notequal"] = options.message; | |
}); |