public class PhoneNumberValidator
extends org.apache.wicket.validation.validator.AbstractValidator
For instance, the following are valid Australian formats for the same number:
1. +61 2 1234 5678 (abbreviated international number)
2. 0011 61 2 1234 5678 (full international number)
3. 02 1234 5678 (expanded area code)
4. (02) 1234 5678 (expanded area code)
5. 1234 5678 (if calling in 02 areacode)
plus all of the above without spaces.
Also added the following style numbers:
6. 111-222-3333
7. 111.222.3333
8. (111) 222-3333-444
9. (111) 222.3333.444
plus combinations of . and - in the same numbers above
Now for numbers with extensions, add (\\w+)?+ 10. All of the above with any letter/number combo afterwards but it must start with a letter and not contain spaces and only occur once or not at all eg (123-456-789 x123, 123 456 789 ext5)
| Constructor and Description |
|---|
PhoneNumberValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onValidate(org.apache.wicket.validation.IValidatable validatable) |
Copyright © 2008-2014 The Sakai Foundation. All Rights Reserved.