Example of Custom Android Keyboard for entering Canadian Postal Code
It implements has following requirements The user should not be able to enter an invalid postal code, with validation occurring character by character. For instance, when the user is at the point in the field where a number must be entered, the keyboard should only enable the numeric keys. A valid postal code has the following characteristics: Format: letter-number-letter-number-letter-number (i.e. M4B1G5) The first letter can only be one of the following: A, B, C, E, G, H, J, K, L, M, N, P, R, S, T, V, X, Y The letters O and I are never valid
#make it generic and configurable, to be able to used for other regions
Ref: http://www.fampennings.nl/maarten/android/09keyboard/index.htm