Telephone, Postal Code validation codes


How do I find ressources to know how to add proper validation for telephone number, postal codes, that sort of thing?

Actually I want to know it this is the same thing as masking? Is there a way to add masking for postal code or telephone number in Custom Press. Would it be using the same box as the validation?

I just need these cases.

canadian postal code: K3K 3K3 (where K=letters and 3=numbers) PS: I want that space to me there.

telephone number without extension: 613-234-3456 or

telephone: (613) 234-3456


telephone with extension: (613) 234-3456 x33333 (extension can be 1 to 5 numbers long)