<?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: Validating Flex forms using the Validator classes</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Fri, 19 Mar 2010 20:35:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-7288</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Wed, 17 Mar 2010 15:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-7288</guid>
		<description>@Jon,

Try explicitly clearing the &lt;code&gt;errorString&lt;/code&gt; properties for each control also:
&lt;pre lang=&quot;actionscript3&quot;&gt;
private function resetForm(evt:MouseEvent):void {
    shippingName.text = &quot;&quot;;
    shippingAddress1.text = &quot;&quot;;
    shippingAddress2.text = &quot;&quot;;
    shippingCity.text = &quot;&quot;;
    shippingState.selectedIndex = -1;
    shippingZipCode.text = &quot;&quot;;
    
    shippingName.errorString = &quot;&quot;;
    shippingAddress1.errorString = &quot;&quot;;
    shippingAddress2.errorString = &quot;&quot;;
    shippingCity.errorString = &quot;&quot;;
    shippingState.errorString = &quot;&quot;;
    shippingZipCode.errorString = &quot;&quot;;
}
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Jon,</p>
<p>Try explicitly clearing the <code>errorString</code> properties for each control also:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> resetForm<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
    shippingName.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
    shippingAddress1.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
    shippingAddress2.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
    shippingCity.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
    shippingState.selectedIndex = <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span>;
    shippingZipCode.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
&nbsp;
    shippingName.errorString = <span style="color: #990000;">&quot;&quot;</span>;
    shippingAddress1.errorString = <span style="color: #990000;">&quot;&quot;</span>;
    shippingAddress2.errorString = <span style="color: #990000;">&quot;&quot;</span>;
    shippingCity.errorString = <span style="color: #990000;">&quot;&quot;</span>;
    shippingState.errorString = <span style="color: #990000;">&quot;&quot;</span>;
    shippingZipCode.errorString = <span style="color: #990000;">&quot;&quot;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-7282</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Wed, 17 Mar 2010 14:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-7282</guid>
		<description>Why does resetting the form still leave all the inputs as invalid (i.e. red border) ? How do you reset the form completely, so someone can start from scratch?</description>
		<content:encoded><![CDATA[<p>Why does resetting the form still leave all the inputs as invalid (i.e. red border) ? How do you reset the form completely, so someone can start from scratch?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc de Kwant</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-6887</link>
		<dc:creator>Marc de Kwant</dc:creator>
		<pubDate>Sat, 30 Jan 2010 09:22:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-6887</guid>
		<description>instead of using an init function to push all validators into an array, I would do this:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;mx:ArrayCollection&gt;
   &lt;mx:ZipCodeValidator id=&quot;shippingZipCode_zipCodeValidator&quot;
        source=&quot;{shippingZipCode}&quot;
        property=&quot;text&quot;
        requiredFieldError=&quot;Please enter a zip code in ZIP+4 format.&quot;
        domain=&quot;{ZipCodeValidatorDomainType.US_ONLY}&quot;  /&gt;
 
    &lt;mx:StringValidator id=&quot;shippingZipCode_stringValidator&quot;
        source=&quot;{shippingZipCode}&quot;
        property=&quot;text&quot;
         tooShortError=&quot;Please enter a zip code in ZIP+4 format.&quot;
        minLength=&quot;10&quot; maxLength=&quot;10&quot; /&gt;
&lt;/mx:ArrayCollection&gt;
&lt;/pre&gt;

Kind regards,

&lt;a href=&quot;http://www.linkedin.com/in/marcdekwant&quot; rel=&quot;nofollow&quot;&gt;Marc&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>instead of using an init function to push all validators into an array, I would do this:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
   <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ZipCodeValidator</span> id=<span style="color: #ff0000;">&quot;shippingZipCode_zipCodeValidator&quot;</span></span>
<span style="color: #000000;">        source=<span style="color: #ff0000;">&quot;{shippingZipCode}&quot;</span></span>
<span style="color: #000000;">        property=<span style="color: #ff0000;">&quot;text&quot;</span></span>
<span style="color: #000000;">        requiredFieldError=<span style="color: #ff0000;">&quot;Please enter a zip code in ZIP+4 format.&quot;</span></span>
<span style="color: #000000;">        domain=<span style="color: #ff0000;">&quot;{ZipCodeValidatorDomainType.US_ONLY}&quot;</span>  <span style="color: #7400FF;">/&gt;</span></span>
 
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:StringValidator</span> id=<span style="color: #ff0000;">&quot;shippingZipCode_stringValidator&quot;</span></span>
<span style="color: #000000;">        source=<span style="color: #ff0000;">&quot;{shippingZipCode}&quot;</span></span>
<span style="color: #000000;">        property=<span style="color: #ff0000;">&quot;text&quot;</span></span>
<span style="color: #000000;">         tooShortError=<span style="color: #ff0000;">&quot;Please enter a zip code in ZIP+4 format.&quot;</span></span>
<span style="color: #000000;">        minLength=<span style="color: #ff0000;">&quot;10&quot;</span> maxLength=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Kind regards,</p>
<p><a href="http://www.linkedin.com/in/marcdekwant" rel="nofollow">Marc</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-6615</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 16 Dec 2009 02:13:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-6615</guid>
		<description>Anybody who  can help me?
I  want to   validate  the password ,which the confirm password is right for the password ?</description>
		<content:encoded><![CDATA[<p>Anybody who  can help me?<br />
I  want to   validate  the password ,which the confirm password is right for the password ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-6564</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 09 Dec 2009 15:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-6564</guid>
		<description>The index for the NumberValidator is off - it doesn&#039;t require a selection if left at 0 that should be changed to 1</description>
		<content:encoded><![CDATA[<p>The index for the NumberValidator is off &#8211; it doesn&#8217;t require a selection if left at 0 that should be changed to 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sameera Sandaruwan</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-6443</link>
		<dc:creator>Sameera Sandaruwan</dc:creator>
		<pubDate>Tue, 24 Nov 2009 10:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-6443</guid>
		<description>1. TextInput creates dynamically
&lt;pre lang=&quot;actionscript3&quot;&gt;
textInputBox = new MyTextInput;
textInputBox.restrict = &quot;0-9.&quot;;
textInputBox.maxChars = 24;
amountValidator = new NumberValidator();
amountValidator.source = textInputBox;
amountValidator.property = &quot;text&quot;;
amountValidator.allowNegative = false;
amountValidator.domain = &quot;real&quot;;
amountValidator.precision = 4;
amountValidator.required = false;
amountValidator.maxValue = 999999999999.9999;
amountValidator.trigger = textInputBox;
amountValidator.triggerEvent = Event.CHANGE;
amountValidator.addEventListener(ValidationResultEvent.VALID, amountValid);
amountValidator.addEventListener(ValidationResultEvent.INVALID, amountInvalid);

private function amountValid(event:ValidationResultEvent):void
{
    valid = true;
    fieldsValidated = true;
}

private function amountInvalid(event:ValidationResultEvent):void
{
    valid = false;
    fieldsValidated = true;
}
&lt;/pre&gt;

2. As mention in the creation, when we exceed the limit, it shows error my red color border, and the same time if you delete them by DEL key when it come to the given acceptable limit, automatically become to green soon.
3. Leave from the field and change values of another textinput(this is just a textinput, this is a form there are some more form elemets), then come back to value exceeded textfield by SHIFT+TABS and remove the additional entered numbers, when you come to green soon your value is accepted.
4.Now again enter more values and now you are in the warn zone, then leave from the field and do the few changes in other form elements.
5. Then come back to the value exceeded text filed by MOUSE CLICK, and start delete from DEL, even though you removed additional values, still fields shows that you are in warn zone.

&lt;strong&gt;Actual Results:&lt;/strong&gt;
Even when remove additional numbers,still field is Red

&lt;strong&gt;Expected Results:&lt;/strong&gt;
if remove additional numbers, field should come its normal status.

Picture of this issue can be viewed at http://bugs.adobe.com/jira/browse/SDK-24372</description>
		<content:encoded><![CDATA[<p>1. TextInput creates dynamically</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">textInputBox = <span style="color: #0033ff; font-weight: bold;">new</span> MyTextInput;
textInputBox.<span style="color: #004993;">restrict</span> = <span style="color: #990000;">&quot;0-9.&quot;</span>;
textInputBox.<span style="color: #004993;">maxChars</span> = <span style="color: #000000; font-weight:bold;">24</span>;
amountValidator = <span style="color: #0033ff; font-weight: bold;">new</span> NumberValidator<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
amountValidator.<span style="color: #004993;">source</span> = textInputBox;
amountValidator.property = <span style="color: #990000;">&quot;text&quot;</span>;
amountValidator.allowNegative = <span style="color: #0033ff; font-weight: bold;">false</span>;
amountValidator.<span style="color: #004993;">domain</span> = <span style="color: #990000;">&quot;real&quot;</span>;
amountValidator.precision = <span style="color: #000000; font-weight:bold;">4</span>;
amountValidator.required = <span style="color: #0033ff; font-weight: bold;">false</span>;
amountValidator.maxValue = <span style="color: #000000; font-weight:bold;">999999999999.9999</span>;
amountValidator.trigger = textInputBox;
amountValidator.triggerEvent = <span style="color: #004993;">Event</span>.<span style="color: #004993;">CHANGE</span>;
amountValidator.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>ValidationResultEvent.VALID, amountValid<span style="color: #000000;">&#41;</span>;
amountValidator.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>ValidationResultEvent.INVALID, amountInvalid<span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> amountValid<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>ValidationResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
    valid = <span style="color: #0033ff; font-weight: bold;">true</span>;
    fieldsValidated = <span style="color: #0033ff; font-weight: bold;">true</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> amountInvalid<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>ValidationResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
    valid = <span style="color: #0033ff; font-weight: bold;">false</span>;
    fieldsValidated = <span style="color: #0033ff; font-weight: bold;">true</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>2. As mention in the creation, when we exceed the limit, it shows error my red color border, and the same time if you delete them by DEL key when it come to the given acceptable limit, automatically become to green soon.<br />
3. Leave from the field and change values of another textinput(this is just a textinput, this is a form there are some more form elemets), then come back to value exceeded textfield by SHIFT+TABS and remove the additional entered numbers, when you come to green soon your value is accepted.<br />
4.Now again enter more values and now you are in the warn zone, then leave from the field and do the few changes in other form elements.<br />
5. Then come back to the value exceeded text filed by MOUSE CLICK, and start delete from DEL, even though you removed additional values, still fields shows that you are in warn zone.</p>
<p><strong>Actual Results:</strong><br />
Even when remove additional numbers,still field is Red</p>
<p><strong>Expected Results:</strong><br />
if remove additional numbers, field should come its normal status.</p>
<p>Picture of this issue can be viewed at <a href="http://bugs.adobe.com/jira/browse/SDK-24372" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-24372</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kethya</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-6323</link>
		<dc:creator>Kethya</dc:creator>
		<pubDate>Wed, 11 Nov 2009 09:29:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-6323</guid>
		<description>Hi everyone,

I am try to put two validators on one control, but it doesn&#039;t seem working well. 
The logic is here.
I put requireValidator and emailValidator on a textBox.
when I click on &quot;myButton&quot; do validation.
- My expectation is:
    if I don&#039;t in put any thing we have required validator error raise
   if I input some text but not match email pattern it will have emailValidator error raise 
- My result: 
   if I don&#039;t input any text requiredFieldValidator raise (correct)
   if I input text but not follow email pattern the emailValidator raise but it doesn&#039;t draw red rectangle around my text input and doesn&#039;t show the validate  message

Please anyone helps,

Thanks

Kethya

Here is my sample code:
====================================
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[
			import mx.controls.Alert;
			import mx.validators.Validator;
			import mx.validators.EmailValidator;
			import com.vecteurplus.sfa.util.validators.RequiredFieldValidator;
			private var _vList:Array;
			private function hBoxInit():void {
				var require:RequiredFieldValidator = new RequiredFieldValidator();
				var email:EmailValidator = new EmailValidator();
				
				require.required = true;
				require.property = &quot;text&quot;;
				require.source = myText;
				
				email.required = false;
				email.property = &quot;text&quot;;
				email.source = myText;
				
				_vList = new Array();
				_vList.push(require);
				_vList.push(email);
			}
			
			private function myButton_clickHandler():void {
				var result:Array = Validator.validateAll(_vList);
				if (result) {
					Alert.show(&quot;there&#039;s error&quot;);
				}
			}
		]]&gt;
	&lt;/mx:Script&gt;
	&lt;mx:HBox creationComplete=&quot;hBoxInit();&quot;&gt;
		&lt;mx:TextInput id=&quot;myText&quot;/&gt;
		&lt;mx:Button id=&quot;myButton&quot;
		label=&quot;myButton&quot;
		click=&quot;myButton_clickHandler();&quot;&gt;
	&lt;/mx:HBox&gt;
&lt;/mx:Application&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi everyone,</p>
<p>I am try to put two validators on one control, but it doesn&#8217;t seem working well.<br />
The logic is here.<br />
I put requireValidator and emailValidator on a textBox.<br />
when I click on &#8220;myButton&#8221; do validation.<br />
- My expectation is:<br />
    if I don&#8217;t in put any thing we have required validator error raise<br />
   if I input some text but not match email pattern it will have emailValidator error raise<br />
- My result:<br />
   if I don&#8217;t input any text requiredFieldValidator raise (correct)<br />
   if I input text but not follow email pattern the emailValidator raise but it doesn&#8217;t draw red rectangle around my text input and doesn&#8217;t show the validate  message</p>
<p>Please anyone helps,</p>
<p>Thanks</p>
<p>Kethya</p>
<p>Here is my sample code:<br />
====================================</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #ff0000;">&quot;absolute&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">		&lt;![CDATA[</span>
<span style="color: #339933;">			import mx.controls.Alert;</span>
<span style="color: #339933;">			import mx.validators.Validator;</span>
<span style="color: #339933;">			import mx.validators.EmailValidator;</span>
<span style="color: #339933;">			import com.vecteurplus.sfa.util.validators.RequiredFieldValidator;</span>
<span style="color: #339933;">			private var _vList:Array;</span>
<span style="color: #339933;">			private function hBoxInit():void {</span>
<span style="color: #339933;">				var require:RequiredFieldValidator = new RequiredFieldValidator();</span>
<span style="color: #339933;">				var email:EmailValidator = new EmailValidator();</span>
&nbsp;
<span style="color: #339933;">				require.required = true;</span>
<span style="color: #339933;">				require.property = &quot;text&quot;;</span>
<span style="color: #339933;">				require.source = myText;</span>
&nbsp;
<span style="color: #339933;">				email.required = false;</span>
<span style="color: #339933;">				email.property = &quot;text&quot;;</span>
<span style="color: #339933;">				email.source = myText;</span>
&nbsp;
<span style="color: #339933;">				_vList = new Array();</span>
<span style="color: #339933;">				_vList.push(require);</span>
<span style="color: #339933;">				_vList.push(email);</span>
<span style="color: #339933;">			}</span>
&nbsp;
<span style="color: #339933;">			private function myButton_clickHandler():void {</span>
<span style="color: #339933;">				var result:Array = Validator.validateAll(_vList);</span>
<span style="color: #339933;">				if (result) {</span>
<span style="color: #339933;">					Alert.show(&quot;there's error&quot;);</span>
<span style="color: #339933;">				}</span>
<span style="color: #339933;">			}</span>
<span style="color: #339933;">		]]&gt;</span>
<span style="color: #339933;">	&lt;/mx:Script&gt;</span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HBox</span> creationComplete=<span style="color: #ff0000;">&quot;hBoxInit();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</span> id=<span style="color: #ff0000;">&quot;myText&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> id=<span style="color: #ff0000;">&quot;myButton&quot;</span></span>
<span style="color: #000000;">		label=<span style="color: #ff0000;">&quot;myButton&quot;</span></span>
<span style="color: #000000;">		click=<span style="color: #ff0000;">&quot;myButton_clickHandler();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:HBox</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: CaptainCode</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-6154</link>
		<dc:creator>CaptainCode</dc:creator>
		<pubDate>Thu, 29 Oct 2009 19:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-6154</guid>
		<description>Any easier way to validate a checkbox, using code built right into the Flex framework, is to use a string validator. When it attemts to validate on the checkbox, the &quot;selected&quot; property is automatically coerced into a string format. See the code below for an example:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;mx:FormItem label=&quot;I agree to the terms of use&quot; required=&quot;true&quot;&gt;
&lt;mx:CheckBox id=&quot;terms&quot;/&gt;
&lt;/mx:FormItem&gt;
&lt;mx:StringValidator source=&quot;{terms}&quot; required=&quot;true&quot; property=&quot;selected&quot; maxLength=&quot;4&quot; requiredFieldError=&quot;You must agree to the Terms of Use.&quot; tooLongError=&quot;You must agree to the Terms of Use.&quot;/&gt;
&lt;/pre&gt;

Clean, simple, built-in, and best of all.... 4 lines of MXML.</description>
		<content:encoded><![CDATA[<p>Any easier way to validate a checkbox, using code built right into the Flex framework, is to use a string validator. When it attemts to validate on the checkbox, the &#8220;selected&#8221; property is automatically coerced into a string format. See the code below for an example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;I agree to the terms of use&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;terms&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:StringValidator</span> source=<span style="color: #ff0000;">&quot;{terms}&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span> property=<span style="color: #ff0000;">&quot;selected&quot;</span> maxLength=<span style="color: #ff0000;">&quot;4&quot;</span> requiredFieldError=<span style="color: #ff0000;">&quot;You must agree to the Terms of Use.&quot;</span> tooLongError=<span style="color: #ff0000;">&quot;You must agree to the Terms of Use.&quot;</span><span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>Clean, simple, built-in, and best of all&#8230;. 4 lines of MXML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lonely in Dallas</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-5407</link>
		<dc:creator>Lonely in Dallas</dc:creator>
		<pubDate>Thu, 27 Aug 2009 19:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-5407</guid>
		<description>Thank you very much for your blog - I refer to it often!</description>
		<content:encoded><![CDATA[<p>Thank you very much for your blog &#8211; I refer to it often!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/comment-page-1/#comment-4878</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Fri, 31 Jul 2009 20:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/#comment-4878</guid>
		<description>Any one run across a International Zip Code Validator yet? or seen any blog on where to get all the information?</description>
		<content:encoded><![CDATA[<p>Any one run across a International Zip Code Validator yet? or seen any blog on where to get all the information?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
