A Simple Form Field Comparison Validator for Flex

In addition to a Date Range Validator control for a recent project, I also need to compare to user input fields for confirm email address and confirm password. Since I’d just extended the DateValidator, I figured the same approach would work for comparing two controls.

Class: FieldComparisonValidator.as

» continue reading
Categories: GeneralFlexPermalink

How to Validate a Date Range in Flex

I had the need to validate a date based on a range of allowed dates, and I couldn’t find this validation control anywhere for Flex. The reason is probably because it’s just so easy to write.

The solution is to write a custom validator that extends DateValidator, pass in the start and end dates, and then perform the validation. This way I can benefit from the nice inline validation Flex gives us.

The actual validation code to compare dates is based on the Date.parse() which you can see in the class code.

The class: DateRangeValidator.as

» continue reading
Categories: GeneralFlexPermalink

360|Flex Conference Wrapup

My first 360|Flex experience began Monday morning with Mike Labriola (@mlabriola, slides) stalking back and forth in front of a standing room only crowd. Shirt un-tucked, one hand thrust into a pocket he held a goblet of water in the other from which he alternately took sips and gestured to his listeners. Delivering his best Sean Astin, Mike transformed the room into his private cigar study. We were all in audience to savor his cognac and digest the divine merits of unit testing Flex applications.

“Welcome to 360|Flex,” I thought. The session was fantastic and Mike was entertaining all the way through the final “ok, get out of here” as he waved his empty goblet and turned his back.

Bookend that session with my final session Wednesday afternoon on Design Patterns delivered by Yakov Fain (@yfain). I whispered to @dmatchack sitting in front of me, “I hope we finally talk about something over than MVC”. He said, “no kidding” and chuckled.

What we received in the next 1 hr and 20 minutes was a much more than that.

» continue reading
Categories: GeneralFlexPermalink