<?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: On a Simple IronPython Validation Framework</title>
	<atom:link href="http://dllhell.net/2008/04/08/on-a-simple-ironpython-validation-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://dllhell.net/2008/04/08/on-a-simple-ironpython-validation-framework/</link>
	<description>Write code.  Not too much.  Mostly C#.</description>
	<lastBuildDate>Fri, 20 Jan 2012 15:07:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: John Zablocki</title>
		<link>http://dllhell.net/2008/04/08/on-a-simple-ironpython-validation-framework/#comment-21</link>
		<dc:creator>John Zablocki</dc:creator>
		<pubDate>Thu, 12 Jun 2008 03:18:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.dllhell.net/index.php/2008/04/08/on-a-simple-ironpython-validation-framework/#comment-21</guid>
		<description>Hi Zahid,

The PythonEngine is part of IronPython.  You can download that at http://www.codeplex.com/IronPython/.

I&#039;m not sure if this is what you were looking for, but I added a sample to the validation project that adds a DateTime property to the User class.  The updated code is at http://code.google.com/p/codevoyeur-samples/.

The new property, Birthday, is a DateTime with a new Validation attribute.

&lt;code&gt;
[Validation(&quot;is_valid_birthdate&quot;)]
public DateTime Birthday { get; set; }
&lt;/code&gt;
The validation rule simply checks whether the property value for Birthday is a date prior to now.
&lt;code&gt;
&lt;rule name=&quot;is_valid_birthdate&quot; message=&quot;Birthday must be a date prior to today&quot;&gt;
    result = property_value.CompareTo(DateTime.Now) == -1
  &lt;/rule&gt;
&lt;/code&gt;

-- John</description>
		<content:encoded><![CDATA[<p>Hi Zahid,</p>
<p>The PythonEngine is part of IronPython.  You can download that at <a href="http://www.codeplex.com/IronPython/" rel="nofollow">http://www.codeplex.com/IronPython/</a>.</p>
<p>I&#8217;m not sure if this is what you were looking for, but I added a sample to the validation project that adds a DateTime property to the User class.  The updated code is at <a href="http://code.google.com/p/codevoyeur-samples/" rel="nofollow">http://code.google.com/p/codevoyeur-samples/</a>.</p>
<p>The new property, Birthday, is a DateTime with a new Validation attribute.</p>
<p><code><br />
[Validation("is_valid_birthdate")]<br />
public DateTime Birthday { get; set; }<br />
</code><br />
The validation rule simply checks whether the property value for Birthday is a date prior to now.<br />
<code><br />
&lt;rule name="is_valid_birthdate" message="Birthday must be a date prior to today"&gt;<br />
    result = property_value.CompareTo(DateTime.Now) == -1<br />
  &lt;/rule&gt;<br />
</code></p>
<p>&#8211; John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zahid Rasool</title>
		<link>http://dllhell.net/2008/04/08/on-a-simple-ironpython-validation-framework/#comment-20</link>
		<dc:creator>Zahid Rasool</dc:creator>
		<pubDate>Wed, 11 Jun 2008 11:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.dllhell.net/index.php/2008/04/08/on-a-simple-ironpython-validation-framework/#comment-20</guid>
		<description>How can we add validation for datatime. There is no option, can we have source code for Python Engine.</description>
		<content:encoded><![CDATA[<p>How can we add validation for datatime. There is no option, can we have source code for Python Engine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

