<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Basic Pattern Matching Form Validation in CodeIgniter</title>
	<atom:link href="http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/</link>
	<description>Senior Developer Michael Wales, featuring articles on web development (PHP, Python and Ruby), industry highlights and open source software releases.</description>
	<lastBuildDate>Mon, 03 Oct 2011 14:20:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Todd</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-1338</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Thu, 19 May 2011 23:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-1338</guid>
		<description>Awesome mate.  Just was I was looking for to validate phone numbers as well as postal codes.</description>
		<content:encoded><![CDATA[<p>Awesome mate.  Just was I was looking for to validate phone numbers as well as postal codes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: delsuza</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-1334</link>
		<dc:creator>delsuza</dc:creator>
		<pubDate>Sat, 16 Apr 2011 23:56:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-1334</guid>
		<description>in CI 2.0 you must change the constructor :)

public function __construct()
    {
        parent::__construct();
    }</description>
		<content:encoded><![CDATA[<p>in CI 2.0 you must change the constructor <img src='http://www.michaelwales.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>public function __construct()<br />
    {<br />
        parent::__construct();<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: headtrip</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-375</link>
		<dc:creator>headtrip</dc:creator>
		<pubDate>Thu, 28 Oct 2010 03:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-375</guid>
		<description>Hello, thanks for sharing this nice snippet.

I just came up with a date format which needs to look like &quot;mm/dd/yyyy&quot; and got an error.

I added &quot;/&quot; to the $characters array (and &quot;\/&quot; as well on $regex_characters array) and it fixed the small issue.

Other than that, thanks a lot and hope to see more of your work.

Regards</description>
		<content:encoded><![CDATA[<p>Hello, thanks for sharing this nice snippet.</p>
<p>I just came up with a date format which needs to look like &#8220;mm/dd/yyyy&#8221; and got an error.</p>
<p>I added &#8220;/&#8221; to the $characters array (and &#8220;\/&#8221; as well on $regex_characters array) and it fixed the small issue.</p>
<p>Other than that, thanks a lot and hope to see more of your work.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pisyek</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-359</link>
		<dc:creator>Pisyek</dc:creator>
		<pubDate>Mon, 05 Jul 2010 02:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-359</guid>
		<description>i have try your tutorial but somehow there is a problem with the lang file.

i need to name it my_form_validation_lang instead of form_validation_lang

thanks for the code...

nice sharing. :D</description>
		<content:encoded><![CDATA[<p>i have try your tutorial but somehow there is a problem with the lang file.</p>
<p>i need to name it my_form_validation_lang instead of form_validation_lang</p>
<p>thanks for the code&#8230;</p>
<p>nice sharing. <img src='http://www.michaelwales.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Wales</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-234</link>
		<dc:creator>Michael Wales</dc:creator>
		<pubDate>Thu, 08 Apr 2010 17:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-234</guid>
		<description>@Dan
My &lt;code&gt;is_unique()&lt;/code&gt; involves a &lt;strong&gt;lot less&lt;/strong&gt; work, but nonetheless good job on being inventive and coming up with a solution that meets your needs!</description>
		<content:encoded><![CDATA[<p>@Dan<br />
My <code>is_unique()</code> involves a <strong>lot less</strong> work, but nonetheless good job on being inventive and coming up with a solution that meets your needs!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-233</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Thu, 08 Apr 2010 17:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-233</guid>
		<description>@Michael
I don&#039;t know how you plan to implement the &quot;is_unique&quot; rule, but I have done this in the past.  My way of doing it is to have the validation function take 2 param...the model name and the field name.  Then I just have to have a &quot;is_unique&quot; function the specified model.  The validation function then calls the is_unique function in the model and sends it the user input and the field name.  The is_unique then chacks the database, and does its then, then returns TRUE or FALSE.

Here is how I use it:
$this-&gt;form_validation-&gt;set_rules(&#039;username&#039;, &#039;Username&#039;, &#039;trim&#124;required&#124;is_unique[user_model,username]&#039;);

Note: The actual function &quot;is_unique&quot; has a prototpye of &quot;function is_unique($str, $params)&quot; then I have to parse the $params variable out becasue of the way that the FormValidation library sends it.

If you would like to see the code let me know and I can shoot it over.

Dan</description>
		<content:encoded><![CDATA[<p>@Michael<br />
I don&#8217;t know how you plan to implement the &#8220;is_unique&#8221; rule, but I have done this in the past.  My way of doing it is to have the validation function take 2 param&#8230;the model name and the field name.  Then I just have to have a &#8220;is_unique&#8221; function the specified model.  The validation function then calls the is_unique function in the model and sends it the user input and the field name.  The is_unique then chacks the database, and does its then, then returns TRUE or FALSE.</p>
<p>Here is how I use it:<br />
$this-&gt;form_validation-&gt;set_rules(&#8216;username&#8217;, &#8216;Username&#8217;, &#8216;trim|required|is_unique[user_model,username]&#8216;);</p>
<p>Note: The actual function &#8220;is_unique&#8221; has a prototpye of &#8220;function is_unique($str, $params)&#8221; then I have to parse the $params variable out becasue of the way that the FormValidation library sends it.</p>
<p>If you would like to see the code let me know and I can shoot it over.</p>
<p>Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Wales</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-90</link>
		<dc:creator>Michael Wales</dc:creator>
		<pubDate>Thu, 25 Feb 2010 18:18:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-90</guid>
		<description>@Todd
Yeah, it&#039;s definitely a pain in the ass. One of my favorite personal validation functions is is_unique, but you&#039;ll have to wait for the CodeIgniter Cookbook for that one!</description>
		<content:encoded><![CDATA[<p>@Todd<br />
Yeah, it&#8217;s definitely a pain in the ass. One of my favorite personal validation functions is is_unique, but you&#8217;ll have to wait for the CodeIgniter Cookbook for that one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd Perkins</title>
		<link>http://www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/#comment-89</link>
		<dc:creator>Todd Perkins</dc:creator>
		<pubDate>Thu, 25 Feb 2010 18:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelwales.com/?p=86#comment-89</guid>
		<description>Very cool Michael!  I hate always having to copy my callbacks from project to project.</description>
		<content:encoded><![CDATA[<p>Very cool Michael!  I hate always having to copy my callbacks from project to project.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  www.michaelwales.com/2010/02/basic-pattern-matching-form-validation-in-codeigniter/feed/ ) in 0.15757 seconds, on Feb 4th, 2012 at 2:17 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 4th, 2012 at 3:17 am UTC -->
