April 13, 2010

What is the RegExpValidator class in Adobe Flex 3?


The RegExpValidator class enables a programmer to use  a regular expression for validating a field. You pass a regular expression to the validator by using the expression property, and additional flags to control the regular expression pattern matching by using the flags property. The process of the validation becomes successful when the validator finds a match of the regular expression in the field to validate; otherwise, an error occurs.


It is used to dispatch the valid and invalid events. The event object is an instance for an invalid event of the validationResultEvent class. It holds an array of validationResult objects. doValidation() is a protected method of the RegExpValidator class. It is used to override of the base class doValidation() method to validate a regular expression. Following are the public properties of the RegExpValidator class:
  • expression: It is used for validation.
  • flags: It is used when the validator finds a match.
  • noExpressionError: It is an error message. It occurs when there is no regular expression specified.
  • noMatchError: It is an error message. It occurs when there are no matches to the regular expression.



Share/Bookmark

1 comments:

EZcertifications Providers said...

Let us get you IT certified for MCSE,CISCO,COMPTIA,SUNJAVA and many others?
Do you have all the skills that require you to perform your duties but lack your certifications?
Let us help you achieve your goal by obtaining this certifications from our testing centers,
we will sit exams on your behalf and you will get the credit and the certifications delivered to your home.

Post a Comment