<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: YUI Unobstrusive Javascript Validation</title>
	<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/</link>
	<description>A snapshot of my more professional life</description>
	<pubDate>Mon, 08 Sep 2008 16:17:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Afnan Zari</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-3423</link>
		<dc:creator>Afnan Zari</dc:creator>
		<pubDate>Wed, 04 Jun 2008 11:07:16 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-3423</guid>
		<description>Saqib ansari .... Would you mind providing code for that fix !!! or is it copyrighted ~~~ (smile)</description>
		<content:encoded><![CDATA[<p>Saqib ansari &#8230;. Would you mind providing code for that fix !!! or is it copyrighted ~~~ (smile)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saqib Ansari</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-3422</link>
		<dc:creator>Saqib Ansari</dc:creator>
		<pubDate>Wed, 04 Jun 2008 10:52:01 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-3422</guid>
		<description>I've modified this script. There was no option to validate only when the value exist in specified field otherwise ignore that field.

Well nice script. Thanks</description>
		<content:encoded><![CDATA[<p>I&#8217;ve modified this script. There was no option to validate only when the value exist in specified field otherwise ignore that field.</p>
<p>Well nice script. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prefabrik</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-2405</link>
		<dc:creator>prefabrik</dc:creator>
		<pubDate>Fri, 25 Apr 2008 20:08:30 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-2405</guid>
		<description>hey thanks for sharing good job keep it up</description>
		<content:encoded><![CDATA[<p>hey thanks for sharing good job keep it up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bcm</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-2316</link>
		<dc:creator>bcm</dc:creator>
		<pubDate>Wed, 23 Apr 2008 05:44:45 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-2316</guid>
		<description>Good job! It's very cool......</description>
		<content:encoded><![CDATA[<p>Good job! It&#8217;s very cool&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: astroloji</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-2040</link>
		<dc:creator>astroloji</dc:creator>
		<pubDate>Sat, 12 Apr 2008 19:52:09 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-2040</guid>
		<description>Cool library. The only thing is that I find it a bit complex to use. But otherwise very nice work.
I have myself also developed a validation library. The idear is that you do not have to use javascript to validate your form.</description>
		<content:encoded><![CDATA[<p>Cool library. The only thing is that I find it a bit complex to use. But otherwise very nice work.<br />
I have myself also developed a validation library. The idear is that you do not have to use javascript to validate your form.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gunther Dippe</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1281</link>
		<dc:creator>Gunther Dippe</dc:creator>
		<pubDate>Sun, 09 Mar 2008 14:03:16 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1281</guid>
		<description>Very nice indeed :-)
Minor whish: It would also be nice to check the email address for leading and trailing spaces.
Thanks mate for an excellent job!</description>
		<content:encoded><![CDATA[<p>Very nice indeed :-)<br />
Minor whish: It would also be nice to check the email address for leading and trailing spaces.<br />
Thanks mate for an excellent job!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1241</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Thu, 06 Mar 2008 09:38:52 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1241</guid>
		<description>Cool library. The only thing is that I find it a bit complex to use. But otherwise very nice work.
I have myself also developed a validation library. The idear is that you do not have to use javascript to validate your form.

check it out at http://www.wowww.nl/wordpress/?p=102</description>
		<content:encoded><![CDATA[<p>Cool library. The only thing is that I find it a bit complex to use. But otherwise very nice work.<br />
I have myself also developed a validation library. The idear is that you do not have to use javascript to validate your form.</p>
<p>check it out at <a href="http://www.wowww.nl/wordpress/?p=102" rel="nofollow">http://www.wowww.nl/wordpress/?p=102</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jc</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1208</link>
		<dc:creator>jc</dc:creator>
		<pubDate>Tue, 04 Mar 2008 00:07:08 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1208</guid>
		<description>I can't believe that no-one has picked up on that bug yet. It seems the script is missing that function (and another one too). This has been fixed in version 2, you can download from the updated link in the article above.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t believe that no-one has picked up on that bug yet. It seems the script is missing that function (and another one too). This has been fixed in version 2, you can download from the updated link in the article above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1181</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Sat, 01 Mar 2008 17:22:15 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1181</guid>
		<description>there is bug when you hit enter in the form but its only happen in Firefox. i try on IE 6 and Safari this script is working fine. The bug is that the form is still submitted and not checked by validation class. When i try to debug with firebug, it says that SearchUp is not defined .. do you know how to solve this ?

thx before</description>
		<content:encoded><![CDATA[<p>there is bug when you hit enter in the form but its only happen in Firefox. i try on IE 6 and Safari this script is working fine. The bug is that the form is still submitted and not checked by validation class. When i try to debug with firebug, it says that SearchUp is not defined .. do you know how to solve this ?</p>
<p>thx before</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1029</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Mon, 18 Feb 2008 10:02:29 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-1029</guid>
		<description>great! thanks.. its the function i'm looking for.. i still prefer the javascript validation than ajax style</description>
		<content:encoded><![CDATA[<p>great! thanks.. its the function i&#8217;m looking for.. i still prefer the javascript validation than ajax style</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-999</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Thu, 14 Feb 2008 20:29:15 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-999</guid>
		<description>also, i wanted to only check the content of an input when it did not have a value. I added a "optional" check, so you can have a input with a class="validate-alpha optional". If the input has no value then let it pass:
added this to the end of the big if/else structure:
if(c.indexOf(' optional ')!=-1 &#38;&#38; t == ''){valid = true}</description>
		<content:encoded><![CDATA[<p>also, i wanted to only check the content of an input when it did not have a value. I added a &#8220;optional&#8221; check, so you can have a input with a class=&#8221;validate-alpha optional&#8221;. If the input has no value then let it pass:<br />
added this to the end of the big if/else structure:<br />
if(c.indexOf(&#8217; optional &#8216;)!=-1 &amp;&amp; t == &#8221;){valid = true}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-998</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Thu, 14 Feb 2008 18:52:22 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-998</guid>
		<description>I might not be the first to point this out. your script is calling a searchUp() function. It looks like this is supposed to by yui's YAHOO.util.Dom.getAncestorByTagName(). I was getting problems submitting with hitting enter in the input fields. I just swapped it out for getAncestorByTagName() and it works fine.</description>
		<content:encoded><![CDATA[<p>I might not be the first to point this out. your script is calling a searchUp() function. It looks like this is supposed to by yui&#8217;s YAHOO.util.Dom.getAncestorByTagName(). I was getting problems submitting with hitting enter in the input fields. I just swapped it out for getAncestorByTagName() and it works fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-974</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Mon, 11 Feb 2008 10:31:58 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-974</guid>
		<description>Ooh, mind you, you need:

var r = RegExp(e.getAttribute('regex'));
if (r &#38;&#38; ! t.replace(/ /,'').match(r)) {
 valid = false;
}

to get rid of those pesky start and trailing slashes... Otherwise, great workaround.</description>
		<content:encoded><![CDATA[<p>Ooh, mind you, you need:</p>
<p>var r = RegExp(e.getAttribute(&#8217;regex&#8217;));<br />
if (r &amp;&amp; ! t.replace(/ /,&#8221;).match(r)) {<br />
 valid = false;<br />
}</p>
<p>to get rid of those pesky start and trailing slashes&#8230; Otherwise, great workaround.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-973</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Mon, 11 Feb 2008 10:10:42 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-973</guid>
		<description>I love it when I find something like this. Nice and easy to implement. does what it says on the tin.

One thing: an alphanumeric search. What about "This search". I know a space is not a alpha or a number but it's still the sort of text you might want to let through in a search but validate-alphanum will fail it. I'll stick Tim's regex and use something like ^[a-zA-Z0-9]+$ for now.</description>
		<content:encoded><![CDATA[<p>I love it when I find something like this. Nice and easy to implement. does what it says on the tin.</p>
<p>One thing: an alphanumeric search. What about &#8220;This search&#8221;. I know a space is not a alpha or a number but it&#8217;s still the sort of text you might want to let through in a search but validate-alphanum will fail it. I&#8217;ll stick Tim&#8217;s regex and use something like ^[a-zA-Z0-9]+$ for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jc</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-763</link>
		<dc:creator>jc</dc:creator>
		<pubDate>Mon, 21 Jan 2008 03:48:15 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-763</guid>
		<description>Sorry peeps, it's taken a while to get your comments approved. You can blame spam bots.

Beanie Girl: Using the YUI for this is primarily due to the event stopping features that it requires for the form. It can also be applied using Protoype (and I've converted it to, but haven't shared yet).

Mus: Conditional validation? Yes, it checks to see if the inputs contain the correct content. On the conidition it doesn't, you get an error :)

Tim: That sounds like a cool idea. If I release a version 2, that's definately in there (with your name attached, of course)</description>
		<content:encoded><![CDATA[<p>Sorry peeps, it&#8217;s taken a while to get your comments approved. You can blame spam bots.</p>
<p>Beanie Girl: Using the YUI for this is primarily due to the event stopping features that it requires for the form. It can also be applied using Protoype (and I&#8217;ve converted it to, but haven&#8217;t shared yet).</p>
<p>Mus: Conditional validation? Yes, it checks to see if the inputs contain the correct content. On the conidition it doesn&#8217;t, you get an error :)</p>
<p>Tim: That sounds like a cool idea. If I release a version 2, that&#8217;s definately in there (with your name attached, of course)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Middleton</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-739</link>
		<dc:creator>Tim Middleton</dc:creator>
		<pubDate>Fri, 18 Jan 2008 16:58:49 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-739</guid>
		<description>Me again. I also added the following a validator to allow me to define arbitrary regular expressions in the HTML code to match against using class "validate-regex". 

Example: 



I inserted the following code on the line following "//search for validate-":

    if (c.indexOf(' validate-regex ') != -1) {
        var r = RegExp(e.getAttribute('regex'));
        if (r &#38;&#38;  ! t.match(r)) {
            valid = false;
        }
    } else</description>
		<content:encoded><![CDATA[<p>Me again. I also added the following a validator to allow me to define arbitrary regular expressions in the HTML code to match against using class &#8220;validate-regex&#8221;. </p>
<p>Example: </p>
<p>I inserted the following code on the line following &#8220;//search for validate-&#8221;:</p>
<p>    if (c.indexOf(&#8217; validate-regex &#8216;) != -1) {<br />
        var r = RegExp(e.getAttribute(&#8217;regex&#8217;));<br />
        if (r &amp;&amp;  ! t.match(r)) {<br />
            valid = false;<br />
        }<br />
    } else</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mus</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-728</link>
		<dc:creator>Mus</dc:creator>
		<pubDate>Tue, 15 Jan 2008 19:33:52 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-728</guid>
		<description>Hi this sounds like a good script I could really use right now. Does it do conditional validation checks too??</description>
		<content:encoded><![CDATA[<p>Hi this sounds like a good script I could really use right now. Does it do conditional validation checks too??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beanie Sigel</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-724</link>
		<dc:creator>Beanie Sigel</dc:creator>
		<pubDate>Mon, 14 Jan 2008 18:28:16 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-724</guid>
		<description>YUI library is very powerful for web development. I use it for AJAX based scripts, but you showed me other thing i must use. 
Thanks a lot.  :)</description>
		<content:encoded><![CDATA[<p>YUI library is very powerful for web development. I use it for AJAX based scripts, but you showed me other thing i must use.<br />
Thanks a lot.  :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay Moses</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-518</link>
		<dc:creator>Vijay Moses</dc:creator>
		<pubDate>Fri, 19 Oct 2007 14:28:14 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-518</guid>
		<description>Great script !!! Thanks. Date validation doesnt seem to work for me - a 20/20/2007 is not caught. Am I missing anything here :-(</description>
		<content:encoded><![CDATA[<p>Great script !!! Thanks. Date validation doesnt seem to work for me - a 20/20/2007 is not caught. Am I missing anything here :-(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hiester</title>
		<link>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-517</link>
		<dc:creator>Chris Hiester</dc:creator>
		<pubDate>Mon, 15 Oct 2007 02:14:15 +0000</pubDate>
		<guid>http://blog.jc21.com/2007-02-05/yui-unobstrusive-javascript-validation/#comment-517</guid>
		<description>Nice job. I'm using this on a project and it works great. Thanks.</description>
		<content:encoded><![CDATA[<p>Nice job. I&#8217;m using this on a project and it works great. Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
