PhoneValidator
| Kind of class: | class |
|---|---|
| Inherits from: | ValidationRule |
| Implements: | |
| Author: | Martijn de Visser |
| Classpath: | org.asapframework.util.forms.validate.PhoneValidator |
| File last modified: | Wednesday, 21 June 2006, 19:05:09 |
Validates if target's value is a (Dutch) phone number. That means that it should have 10 digits in a row and start with 0 (zero), example: 0204604500
Implementation note:
- Please note that any leading and trailing spaces will be ignored.
Summary
Constructor
- PhoneValidator (inTarget:Object)
Instance properties
Instance properties inherited from ValidationRule
Instance methods
Instance methods inherited from ValidationRule
Constructor
PhoneValidator
function PhoneValidator (
inTarget:Object)
Parameters:
inTarget:
Object to validate, has to implement the IValidate interface. Except TextFields, these will be accessed through .text.
Instance methods
toString
function toString (
) : String
Returns readable name of rule.
Overrides:
Specified by:
validate
function validate (
) : Boolean
Validates rule.
To do:
- Implement extended patterns, so international numbers can be validated as well (start with '+', may be more or less than 10 digits).
Overrides:
Specified by: