Last active
January 15, 2023 14:39
-
-
Save jrignacio/734426 to your computer and use it in GitHub Desktop.
Regular expressions for common form fields in Singapore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contact = /(^[689]{1}\d{7}$)/; | |
mobile = /(^[89]{1}\d{7}$)/; | |
nric_fin = /^[FGST]{1}\d{7}[A-Z]{1}$/i; | |
email = /^([A-Z0-9_\.\-\+])+\@(([A-Z0-9\-])+\.)+([A-Z0-9]{2,4})+$/i; | |
postal_code = /(^\d{6}$)/; | |
unit_no = /([-#0-9])/; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment