<?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: Form Validation Sucks.</title>
	<atom:link href="http://blog.afoolishmanifesto.com/archives/907/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.afoolishmanifesto.com/archives/907</link>
	<description>fREWdiculous!</description>
	<lastBuildDate>Tue, 09 Mar 2010 02:34:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Theory</title>
		<link>http://blog.afoolishmanifesto.com/archives/907/comment-page-1#comment-227</link>
		<dc:creator>Theory</dc:creator>
		<pubDate>Thu, 09 Jul 2009 18:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.afoolishmanifesto.com/?p=907#comment-227</guid>
		<description>No, not annoying. `NULL` means &quot;unknown&quot;. The value submitted isn&#039;t unknown, it was intentionally left blank. I understand that you can&#039;t store a blank value in a numeric column, so one usually decides to either interpret a `NULL` as either &quot;unknown&quot; or &quot;known but blank,&quot; or to assign a default value when it&#039;s known but blank, such as 0. Either way, you *should* have to think about it and make the decision.

Also, HTML forms don&#039;t have &quot;numeric&quot; fields, just text. And of course, a text field that&#039;s known but blank is &#039;&#039;. So you are using a text field for an inherently numeric value and annoyed when you get a text value back. Don&#039;t users also send &quot;foo&quot;?

So the best thing to do is to use a field type where you don&#039;t have to do any validation, such as a select list with all possible (legal) values.

—Theory</description>
		<content:encoded><![CDATA[<p>No, not annoying. `NULL` means &#8220;unknown&#8221;. The value submitted isn&#8217;t unknown, it was intentionally left blank. I understand that you can&#8217;t store a blank value in a numeric column, so one usually decides to either interpret a `NULL` as either &#8220;unknown&#8221; or &#8220;known but blank,&#8221; or to assign a default value when it&#8217;s known but blank, such as 0. Either way, you *should* have to think about it and make the decision.</p>
<p>Also, HTML forms don&#8217;t have &#8220;numeric&#8221; fields, just text. And of course, a text field that&#8217;s known but blank is &#8221;. So you are using a text field for an inherently numeric value and annoyed when you get a text value back. Don&#8217;t users also send &#8220;foo&#8221;?</p>
<p>So the best thing to do is to use a field type where you don&#8217;t have to do any validation, such as a select list with all possible (legal) values.</p>
<p>—Theory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://blog.afoolishmanifesto.com/archives/907/comment-page-1#comment-226</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:43:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.afoolishmanifesto.com/?p=907#comment-226</guid>
		<description>Have you looked at HTML::FormFu, or Rose::HTML::Form?  Both of these provide abstractions that (generally) allow you not to have to worry so much about that level of nitty gritty.

But yeah, generally writing validation sucks, which is why there are so many forms out there on the tubes with bad validation leading to bad user experiences.</description>
		<content:encoded><![CDATA[<p>Have you looked at HTML::FormFu, or Rose::HTML::Form?  Both of these provide abstractions that (generally) allow you not to have to worry so much about that level of nitty gritty.</p>
<p>But yeah, generally writing validation sucks, which is why there are so many forms out there on the tubes with bad validation leading to bad user experiences.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zbigniew Lukasiak</title>
		<link>http://blog.afoolishmanifesto.com/archives/907/comment-page-1#comment-225</link>
		<dc:creator>Zbigniew Lukasiak</dc:creator>
		<pubDate>Thu, 09 Jul 2009 07:17:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.afoolishmanifesto.com/?p=907#comment-225</guid>
		<description>In FormHandler this checkbox issue is handled by a special attribute &quot;input_without_param&quot;.  But I don&#039;t understand your concern about &#039;&#039; =! NULL - i the case of non string fields the convention that &#039;&#039; is converted to NULLs works OK - the problem is with string fields - where &#039;&#039; is a valid value.</description>
		<content:encoded><![CDATA[<p>In FormHandler this checkbox issue is handled by a special attribute &#8220;input_without_param&#8221;.  But I don&#8217;t understand your concern about &#8221; =! NULL &#8211; i the case of non string fields the convention that &#8221; is converted to NULLs works OK &#8211; the problem is with string fields &#8211; where &#8221; is a valid value.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
