<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JavaScript &#8211; Other Things</title>
	<atom:link href="https://blog.adamzolo.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.adamzolo.com</link>
	<description>Blog about Things by Adam Zolotarev</description>
	<lastBuildDate>Sun, 24 Sep 2017 18:31:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>eslint ignore parameters with underscore</title>
		<link>https://blog.adamzolo.com/eslint-ignore-parameters-with-underscore/</link>
					<comments>https://blog.adamzolo.com/eslint-ignore-parameters-with-underscore/#comments</comments>
		
		<dc:creator><![CDATA[Adam Zolo]]></dc:creator>
		<pubDate>Thu, 07 Sep 2017 14:09:46 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">http://blog.adamzolo.com/?p=673</guid>

					<description><![CDATA[This rule will make no-unused-vars rule ignore all function parameters starting with underscore.]]></description>
										<content:encoded><![CDATA[<p>This rule will make no-unused-vars rule ignore all function parameters starting with underscore.</p>
<pre class="brush: plain; title: ; notranslate">
  &quot;rules&quot;: {
    &quot;no-unused-vars&quot;: &#x5B;2, {&quot;args&quot;: &quot;all&quot;, &quot;argsIgnorePattern&quot;: &quot;^_&quot;}]
  }
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamzolo.com/eslint-ignore-parameters-with-underscore/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Configuring ESLint and Prettier in Atom</title>
		<link>https://blog.adamzolo.com/configuring-eslint-prettier-atom/</link>
					<comments>https://blog.adamzolo.com/configuring-eslint-prettier-atom/#respond</comments>
		
		<dc:creator><![CDATA[Adam Zolo]]></dc:creator>
		<pubDate>Thu, 11 May 2017 21:35:37 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">http://blog.adamzolo.com/?p=600</guid>

					<description><![CDATA[Install eslint and optional plugins: npm install -g eslint eslint-plugin-react Install atom plugins: linter-eslint prettier-atom Create .eslintrc either in the root of your application (or your root path if you want it to be global) Add simple configuration rules: { &#34;plugins&#34;: &#x5B; &#34;react&#34; ], &#34;parserOptions&#34;: { &#34;ecmaVersion&#34;: 6, &#34;sourceType&#34;: &#34;module&#34;, &#34;ecmaFeatures&#34;: { &#34;jsx&#34;: true }&#8230;<p><a class="more-link" href="https://blog.adamzolo.com/configuring-eslint-prettier-atom/" title="Continue reading &#8216;Configuring ESLint and Prettier in Atom&#8217;">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Install eslint and optional plugins:</p>
<pre class="brush: plain; title: ; notranslate">
npm install -g eslint eslint-plugin-react
</pre>
<p>Install atom plugins:</p>
<pre class="brush: plain; title: ; notranslate">
linter-eslint
prettier-atom
</pre>
<p>Create .eslintrc either in the root of your application (or your root path if you want it to be global)</p>
<p>Add simple configuration rules:</p>
<pre class="brush: plain; title: ; notranslate">
{
    &quot;plugins&quot;: &#x5B;
        &quot;react&quot;
    ],
    &quot;parserOptions&quot;: {
        &quot;ecmaVersion&quot;: 6,
        &quot;sourceType&quot;: &quot;module&quot;,
        &quot;ecmaFeatures&quot;: {
            &quot;jsx&quot;: true
        }
    },
    &quot;env&quot;: {
        &quot;es6&quot;:     true,
        &quot;browser&quot;: true,
        &quot;node&quot;:    true,
        &quot;mocha&quot;:   true
    },   
    &quot;extends&quot;: &#x5B;
        &quot;eslint:recommended&quot;, 
        &quot;plugin:react/recommended&quot;
    ],    
    &quot;rules&quot;: {
    }
}
</pre>
<p>Optionally, update atom prettier-atom to format on save (in plugin settings)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamzolo.com/configuring-eslint-prettier-atom/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ESLint with Visual Studio 2015</title>
		<link>https://blog.adamzolo.com/eslint-visual-studio-2015/</link>
					<comments>https://blog.adamzolo.com/eslint-visual-studio-2015/#respond</comments>
		
		<dc:creator><![CDATA[Adam Zolo]]></dc:creator>
		<pubDate>Tue, 19 Apr 2016 00:23:14 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">http://www.eazolo.com/blog/?p=266</guid>

					<description><![CDATA[If you used Web Essentials as your linter, you probably learned by now that it doesn&#8217;t provide that functionality anymore in VS 2015. One way to fix it is to start using tools like gulp… or you could install a plugin &#8211; Web Analyzer The tool seems to rely on node, so you need to&#8230;<p><a class="more-link" href="https://blog.adamzolo.com/eslint-visual-studio-2015/" title="Continue reading &#8216;ESLint with Visual Studio 2015&#8217;">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>If you used Web Essentials as your linter, you probably learned by now that it doesn&#8217;t provide that functionality anymore in VS 2015.<br />
One way to fix it is to start using tools like gulp… or you could install a plugin &#8211; <a href="https://visualstudiogallery.msdn.microsoft.com/6edc26d4-47d8-4987-82ee-7c820d79be1d" target="_blank">Web Analyzer</a> </p>
<p>The tool seems to rely on node, so you need to install that as well. Also, it doesn&#8217;t look like it installs all of the necessary packages (at least it didn&#8217;t work for me, until I installed the packages). So, you may need to run npm install for these packages:<br />
npm install -g eslint eslint-config-defaults<br />
npm install -g babel-eslint</p>
<p>To config it, go to Tools &#8211; Web Analyzer &#8211; Edit ESLint Settings. All of the configuration settings can be found at <a href="http://eslint.org/" target="_blank">http://eslint.org/</a>. For example, if you use Jasmine tests and jQuery, your &#8220;env&#8221; will look like this:<br />
	&#8220;env&#8221;: {<br />
		&#8220;browser&#8221;: true,<br />
		&#8220;node&#8221;: true,<br />
		&#8220;es6&#8221;: true,<br />
		&#8220;jasmine&#8221;: true,<br />
		&#8220;jquery&#8221;: true<br />
}</p>
<p>In the &#8220;rules&#8221; block you can turn on/off individual rules and specify if they should show up as warnings (1) or errors (2).<br />
	&#8220;rules&#8221;: {<br />
		&#8220;eqeqeq&#8221;: 2,<br />
&#8230;<br />
This means that if ESLint sees &#8220;==&#8221; instead of &#8220;===&#8221; it will show up as an error in your Visual Studio Error List.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamzolo.com/eslint-visual-studio-2015/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>From .Net Developer to Elm. Part 2 – Making a Simple Project.</title>
		<link>https://blog.adamzolo.com/making-simple-elm-project/</link>
					<comments>https://blog.adamzolo.com/making-simple-elm-project/#respond</comments>
		
		<dc:creator><![CDATA[Adam Zolo]]></dc:creator>
		<pubDate>Mon, 11 Apr 2016 11:46:33 +0000</pubDate>
				<category><![CDATA[Elm]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://www.eazolo.com/blog/?p=243</guid>

					<description><![CDATA[In this article I&#8217;ll write a simple Bayesian Calculator using Elm. Link to final project &#8211; Bayesian Calculator &#8211; Source Code Create a directory for your project. cd into it. Run &#8220;elm-make&#8221; to initialize a new elm project. Install some packages for working with web: elm-package install &#8220;evancz/elm-html&#8221; elm-package install &#8220;evancz/start-app&#8221; start-app takes care of&#8230;<p><a class="more-link" href="https://blog.adamzolo.com/making-simple-elm-project/" title="Continue reading &#8216;From .Net Developer to Elm. Part 2 – Making a Simple Project.&#8217;">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>In this article I&#8217;ll write a simple Bayesian Calculator using Elm.<br />
Link to final project &#8211; <a href="https://www.eazolo.com/apps/bayesiancalculator/calculator.html" target="_blank">Bayesian Calculator</a> &#8211; <a href="https://github.com/adamzolotarev/elm-bayesian-calculator" target="_blank">Source Code</a></p>
<p>Create a directory for your project.<br />
cd into it.<br />
Run &#8220;elm-make&#8221; to initialize a new elm project.<br />
Install some packages for working with web:</p>
<p>elm-package install &#8220;evancz/elm-html&#8221;<br />
elm-package install &#8220;evancz/start-app&#8221;</p>
<p>start-app takes care of some application wiring,&#8221;<a href="https://github.com/evancz/start-app" target="_blank">setting everything up so you can focus entirely on writing your app</a>&#8221;</p>
<p>If you open elm-package.json, you will see that the packages, which we just installed, were added to &#8220;dependencies&#8221; node.</p>
<p>I&#8217;ll use npm and gulp to manage my build. Also, I&#8217;m using bootstrap (cause css is hard)<br />
npm init<br />
npm install bootstrap &#8211;save-dev<br />
npm install gulp &#8211;save-dev<br />
npm install gulp-elm &#8211;save-dev<br />
npm install gulp-rename &#8211;save-dev</p>
<p>The last piece of setting up is gulp. In the <a href="https://github.com/adamzolotarev/elm-bayesian-calculator/blob/master/gulpfile.js" target="_blank">script</a>, I just combine all css and js into bundles and copy them to dest folder.</p>
<p>We&#8217;re ready to start writing our app.</p>
<p>Create <a href="https://github.com/adamzolotarev/elm-bayesian-calculator/blob/master/src/Calculator.elm" target="_blank">Calculator.elm</a>. This is where our code will go.</p>
<p>Create <a href="https://github.com/adamzolotarev/elm-bayesian-calculator/blob/master/src/Calculator.html" target="_blank">Calculator.html</a>. This will encapsulate resulting JavaScript file from Elm. Since I&#8217;m writing a full-screen application, all we have to do is add this to the script block:</p>
<p>var app = Elm.fullscreen(Elm.Calculator);</p>
<p>Now, to the application code.</p>
<p>Our model is quite simple &#8211; consists of four string fields related to four input fields on the form.<br />
We have three inputs on the page &#8211; all encapsulated inside entryForm:</p>
<pre class="brush: plain; title: ; notranslate">
entryForm : Address Action -&gt; Model -&gt; Html
entryForm address model =
  div
    &#x5B; class &quot;form-horizontal&quot; ]
    &#x5B; formGroupItem (priorProbabilityItem address model)
    , formGroupItem (hitRateItem address model)
    , formGroupItem (falseAlarmItem address model)
    , formGroupItem (resultItem address model)
    ]
</pre>
<p>formGroupItem is simply a method to produce another div with a class of &#8220;form-group&#8221;:</p>
<pre class="brush: plain; title: ; notranslate">
formGroupItem : List Html -&gt; Html
formGroupItem body =
  div
    &#x5B; class &quot;form-group&quot; ]
    body
</pre>
<p>body in here is just a list of Html elements that we are passing to our div.</p>
<p>Let&#8217;s look at one of the inputs: </p>
<pre class="brush: plain; title: ; notranslate">
priorProbabilityItem : Address Action -&gt; Model -&gt; List Html
priorProbabilityItem address model =
  &#x5B; label
      &#x5B; for &quot;priorProbability&quot;, class &quot;col-md-3 control-label&quot; ]
      &#x5B; text &quot;Prior Probability&quot; ]
  , div
      &#x5B; class &quot;col-md-9&quot; ]
      &#x5B; input
          &#x5B; type' &quot;text&quot;
          , placeholder &quot;0.00&quot;
          , value model.priorProbability
          , id &quot;priorProbability&quot;
          , autofocus True
          , Utils.onInput address UpdateInitialProbability
          ]
          &#x5B;]
      ]
  ]
</pre>
<p>We have a label and a div with an input which maps to priorProbability field in our model.<br />
Every time a user enters something we react to it by addressing UpdateInitialProbability action:</p>
<pre class="brush: plain; title: ; notranslate">
update : Action -&gt; Model -&gt; Model
update action model =
  case action of
...
    UpdateInitialProbability probability -&gt;
      { model | priorProbability = probability }
...
</pre>
<p>In the code above we are updating our model with the new value that a user entered for priorProbability.<br />
We have the same logic for all of the other input fields.</p>
<p>Every time a model changes, we try to show the Bayes calculation result:</p>
<pre class="brush: plain; title: ; notranslate">
resultItem : Address Action -&gt; Model -&gt; List Html
resultItem address model =
  &#x5B; label
      &#x5B; for &quot;bayesResult&quot;, class &quot;col-md-3 control-label&quot; ]
      &#x5B; text &quot;New Probability&quot; ]
  , div
      &#x5B; class &quot;col-md-9&quot; ]
      &#x5B; span &#x5B;] &#x5B; text (bayesResult model) ]
      ]
  ]
</pre>
<p>bayesResult is responsible for generating new probability. If some input is invalid, we just don&#8217;t display anything. Sure, validation could be a little more sophisticated, but we&#8217;re just trying it out.</p>
<p>While in development, make sure to run elm-reactor and gulp in the command line &#8211; open two tabs or windows (depending on your console app) for each one and just run &#8220;elm-reactor&#8221; in one, and &#8220;gulp&#8221; in another. </p>
<p>In order to see your app in a browser, go to http://localhost:8000/dest/Calculator.html<br />
Every time you save your elm file, it should update the js files in the dest folder. You still have to refresh the browser to see the changes. I haven&#8217;t quite figured the auto-refresh part with gulp and elm.</p>
<p>If you want to see the build errors, they should show up in the console, which runs gulp command. Alternatively, if you use Sublime, press Ctrl + B to build it and all errors should show up directly in Sublime.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamzolo.com/making-simple-elm-project/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What&#8217;s new JavaScript 2015/es6 (short summary)</title>
		<link>https://blog.adamzolo.com/javascript-2015-short-summary/</link>
					<comments>https://blog.adamzolo.com/javascript-2015-short-summary/#respond</comments>
		
		<dc:creator><![CDATA[Adam Zolo]]></dc:creator>
		<pubDate>Sat, 02 Apr 2016 18:49:50 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">http://www.eazolo.com/blog/?p=214</guid>

					<description><![CDATA[let &#8211; block scope; no hoisting const Blocked scoped functions { function foo () { return 1 } foo() === 1 { function foo () { return 2 } foo() === 2 } foo() === 1 } Destructuring let foo = &#x5B;&#34;one&#34;, &#34;two&#34;, &#34;three&#34;]; let &#x5B;one, two, three] = foo; console.log(one); // &#34;one&#34; console.log(two); //&#8230;<p><a class="more-link" href="https://blog.adamzolo.com/javascript-2015-short-summary/" title="Continue reading &#8216;What&#8217;s new JavaScript 2015/es6 (short summary)&#8217;">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
										<content:encoded><![CDATA[<ul>
<li>let &#8211; block scope; no hoisting</li>
<li> const </li>
<li> Blocked scoped functions
<pre class="brush: jscript; title: ; notranslate">
{
    function foo () { return 1 }
    foo() === 1
    {
        function foo () { return 2 }
        foo() === 2
    }
    foo() === 1
}
</pre>
</li>
<li>Destructuring
<pre class="brush: jscript; title: ; notranslate">
let foo = &#x5B;&quot;one&quot;, &quot;two&quot;, &quot;three&quot;];

let &#x5B;one, two, three] = foo;
console.log(one); // &quot;one&quot;
console.log(two); // &quot;two&quot;
console.log(three); // &quot;three&quot;

//swapping
let a = 1;
let b = 3;
&#x5B;a, b] = &#x5B;b, a];
console.log(a); // 3
console.log(b); // 1


var expense = {
  type: 'Business',
  amount: '$40'
}
const {type, amount} = expense;

//Or use in functions:
function({type, amount}){}

</pre>
</li>
<li>
Defaults</p>
<pre class="brush: jscript; title: ; notranslate">
let hasDefaults = function(something = &quot;default&quot;){
console.log(something); //default
}
</pre>
</li>
<li>
Rest/Spread</p>
<pre class="brush: jscript; title: ; notranslate">
Rest:
function sortRestArgs(...theArgs) {
  var sortedArgs = theArgs.sort();
  return sortedArgs;
}

console.log(sortRestArgs(5,3,7,1)); // shows 1,3,5,7

Spread:
const defaultColors = &#x5B;'red', 'green'];
const extraColors = &#x5B;'orange', 'blue'];

&#x5B;...defaultColors, ...extraColors]

</pre>
</li>
<li>
Template literals</p>
<pre class="brush: jscript; title: ; notranslate">
var a = 5;
var b = 10;
console.log(`Fifteen is ${a + b} and\nnot ${2 * a + b}.`);
// &quot;Fifteen is 15 and
// not 20.&quot;
</pre>
</li>
<li>
Arrow Functions </p>
<pre class="brush: jscript; title: ; notranslate">
let add = (a,b) =&gt; a+b;
let sum = add(1,2);
</pre>
<p>Also makes &#8216;this&#8217; behave as you would expect it to behave.
</li>
<li>Iterators and Generators
<pre class="brush: jscript; title: ; notranslate">
for(let value of &#x5B;&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]){
    console.log(value)
}
// &quot;a&quot;
// &quot;b&quot;
// &quot;c&quot;

function* idMaker(){
  var index = 0;
  while(true)
    yield index++;
}
var gen = idMaker();

console.log(gen.next().value); // 0
console.log(gen.next().value); // 1
console.log(gen.next().value); // 2
//Or
for(let value of idMaker()){
    console.log(value)
}

</pre>
</li>
<li>
New Data Types</p>
<pre class="brush: jscript; title: ; notranslate">
var myMap = new Map();
myMap.set(0, &quot;zero&quot;);
myMap.set(1, &quot;one&quot;);
for (var &#x5B;key, value] of myMap) {
  console.log(key + &quot; = &quot; + value);
}
// Will show 2 logs; first with &quot;0 = zero&quot; and second with &quot;1 = one&quot;


var mySet = new Set();
mySet.add(1);
mySet.add(5);
mySet.add(&quot;some text&quot;);
var o = {a: 1, b: 2};
mySet.add(o);

mySet.has(1); // true
mySet.has(3); // false, 3 has not been added to the set
mySet.has(5);              // true
mySet.has(Math.sqrt(25));  // true
mySet.has(&quot;Some Text&quot;.toLowerCase()); // true
mySet.has(o); // true

mySet.size; // 4

mySet.delete(5); // removes 5 from the set
mySet.has(5);    // false, 5 has been removed

var wm1 = new WeakMap(),
    wm2 = new WeakMap(),
    wm3 = new WeakMap();
var o1 = {},
    o2 = function(){},
    o3 = window;

wm1.set(o1, 37);
wm1.set(o2, &quot;azerty&quot;);
wm2.set(o1, o2); // a value can be anything, including an object or a function
wm2.set(o3, undefined);
wm2.set(wm1, wm2); // keys and values can be any objects. Even WeakMaps!

ar ws = new WeakSet();
var obj = {};
var foo = {};

ws.add(window);
ws.add(obj);

ws.has(window); // true
ws.has(foo);    // false, foo has not been added to the set

ws.delete(window); // removes window from the set
ws.has(window);    // false, window has been removed

</pre>
</li>
<li>
Modules</p>
<pre class="brush: jscript; title: ; notranslate">
//a.js:
export let a ={};
export let b =function(){};

//c.js:
import {a,b} from c
</pre>
</li>
<li>
Promises</p>
<pre class="brush: jscript; title: ; notranslate">
    var p1 = new Promise(        
        function(resolve, reject) {
            window.setTimeout(
                function() {
                    resolve(42);
                }, Math.random() * 2000 + 1000);
        });   
    p1.then(
        function(val) {           
        })
    .catch(
        function(reason) {
            console.log('Handle rejected promise ('+reason+') here.');
        });

//With fetch:
fetch(url)
  .then(response =&gt; response.json())
  .then(data =&gt; console.log(data));
</pre>
</li>
<li>Class, constructors</li>
<pre class="brush: jscript; title: ; notranslate">

class Test {
  constructor({someProperty}){}
  method(){}
}

class SubTest extends Test{
  constructor(options){
    super(options);
  }
  subMethod(){}
}
</pre>
<li>Array Helper methods
<pre class="brush: jscript; title: ; notranslate">
forEach
map
filter
find
every
some
reduce
</pre>
<p>Examples:</p>
<pre class="brush: jscript; title: ; notranslate">
let colors = &#x5B;'red', 'blue', 'green'];
colors.forEach(c =&gt; console.log(c)); 

let numbers = &#x5B;1, 2, 3];
let doubled = numbers.map(c =&gt; c * 2);
let sum = numbers.reduce((sum, number) =&gt; sum + number, 0)

let divisibleByTwo = numbers.filter(c =&gt; c % 2 === 0);
let allDivisibleByTwo= numbers.every(c =&gt; c % 2 === 0);
let someDivisibleByTwo= numbers.some(c =&gt; c % 2 === 0);


let users = &#x5B; {name: 'Jay'},{name: 'May'},{name: 'Jay'} ]
let jay = users.find(u =&gt; u.name === 'Jay')

</pre>
</li>
<li>
Enhanced Object Literals</p>
<pre class="brush: jscript; title: ; notranslate">
function test(someValue)
	{
    return {
      someValue: somevalue,
      someFunction: function(){}
 }

Is now equivalent to 
  
 function test(someValue)
	{
    return {
      someValue,
      someFunction(){}
 }


</pre>
</li>
</ul>
<p>Some great resources on es6 &#8211; <a href="https://developer.mozilla.org" target="_blank">https://developer.mozilla.org</a> and <a href="http://es6-features.org/">http://es6-features.org/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamzolo.com/javascript-2015-short-summary/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Custom Dynamic Error Messages with JQuery Unobtrusive Validation</title>
		<link>https://blog.adamzolo.com/custom-dynamic-error-messages-jquery-unobtrusive-validation/</link>
					<comments>https://blog.adamzolo.com/custom-dynamic-error-messages-jquery-unobtrusive-validation/#respond</comments>
		
		<dc:creator><![CDATA[Adam Zolo]]></dc:creator>
		<pubDate>Sat, 21 Mar 2015 19:58:24 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">http://eazolo.com/blog/?p=128</guid>

					<description><![CDATA[This could be helpful for the circumstances when you need to dynamically determine the error message for one of you custom validators: $.validator.addMethod('customvalidatorname', function(value, element, parameters) { return validationFunction(); }, function(params, element) { return errorMessageFunction(); }); The third parameter to addMethod can be a function which dynamically determines your error message.]]></description>
										<content:encoded><![CDATA[<p>This could be helpful for the circumstances when you need to dynamically determine the error message for one of you custom validators:</p>
<pre class="brush: jscript; title: ; notranslate">
$.validator.addMethod('customvalidatorname', function(value, element, parameters) {
	return validationFunction();
}, function(params, element) {
	return errorMessageFunction();
});
</pre>
<p>The third parameter to addMethod can be a function which dynamically determines your error message.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamzolo.com/custom-dynamic-error-messages-jquery-unobtrusive-validation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
