Validators with Formatters in a Stateful Form

I’ve released a project on GitHub called Form & Function. I build this project and then used for a large Eligibility Application for a client, where it proved pretty useful. The problem domain I was dealing with dealt with how to develop a large, forms based application where user-feedback needs to be rock-solid and the feedback needs to happen constantly, to ensure as many fields get completed in a single setting as possible.  

In a nutshell, what does it do?
Form & Function
reminds a user that their time-investment matters to you and your organization by giving the best possible experience when filling out a form.

In brief technical jargon, what does it do?
Form & Function creates the relationship between a validator, a formatter, and a restrictor for the most popular form types, and then notifies the developer and user about a form’s validity.

Who does it help?

  1. For developers, it simplifies building complex forms.
  2. For users, it helps them complete long forms.
  3. For project managers, it’s a milestone met.
  4. For user experience designers, it’s a starting place for a conversation.

Where can I find Form & Function?
The code base is hosted on code.google.com. Feel free to download the latest version of Form & Function from the Subversion trunk. Over the next few months, the project will be in a “Bleeding-Edge” release, and should not be considered backwards compatible from day-to-day.

What problems can Form & Function solve with my Flex Project?

Problem 1: The standard Flex Validators are too generic
Let’s start from the top and talk about the Adobe Flex validators. The types of validators Flex currently offers are:

  • CreditCardValidator
  • CurrencyValidator
  • DateValidator
  • EmailValidator
  • NumberValidator
  • PhoneNumberValidator
  • RegExpValidator
  • SocialSecurityValidator
  • StringValidator
  • Validator
  • ZipCodeValidator

Adobe gives you all the hooks you need to build your own validators using the Validator class and the RegExpValidator class (and both are used liberally with Form & Function).

The more specific validators, such as the CreditCardValidator, won’t validate credit-card security codes, only credit-card numbers). While a Merchant may not require the user enter a security code, the ability to validate against a security-code that’s tied into the card-type, should have been there all along, along with a CreditCardFormatter for user legibility.

Form & Function has validators that either improve upon, or plain-old, don’t exist in the latest Flex SDK.
Read More