THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
@Validate("required,regexp=^\\d{5}(-\\d{4})?$") public String getZip() { return zip; } |
...
Now, just put the regular expression into the CreateAddress message catalog:
No Format |
---|
zip-regexp=^\\d{5}(-\\d{4})?$ zip-regexp-message=Zip Codes are five or nine digits. Example: 02134 or 90125-1655. |
...