SirReadAlot
asked on
Validation
How do you validate the following:
UK National Insurance number( e.g pw 25 45 45 B)
UK PHONE NUMBER (eg 0000 000 0000)
thanks
UK National Insurance number( e.g pw 25 45 45 B)
UK PHONE NUMBER (eg 0000 000 0000)
thanks
ASKER
Basically i want to past them into the validation expression.
so far non works UK Nation Insurance Number (aa 11 11 66 h)
"^[A-Z]{2}[0-9]{6}[A-DFM]{ 1}$"
so far non works UK Nation Insurance Number (aa 11 11 66 h)
"^[A-Z]{2}[0-9]{6}[A-DFM]{
ASKER
Basically i want to paste them into the validation expression.
so far non works.
UK Nation Insurance Number (aa 11 11 66 h)
"^[A-Z]{2}[0-9]{6}[A-DFM]{ 1}$"
UK PHONE NUMBER (eg 0000 000 0000)
so far non works.
UK Nation Insurance Number (aa 11 11 66 h)
"^[A-Z]{2}[0-9]{6}[A-DFM]{
UK PHONE NUMBER (eg 0000 000 0000)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks GL!!
THIS IS MORE THAN ENOUGH!!
THIS IS MORE THAN ENOUGH!!
Private Function IsValidUKNI(ByVal RegExString As String) As Boolean
Dim pattern As String = "^[A-Z]{2}[0-9]{6}[A-DFM]{
Dim expression As Regex = New Regex(pattern)
Return expression.IsMatch(RegExSt
End Function
Private Function IsValidUKPN(ByVal RegExString As String) As Boolean
Dim pattern As String = "(\s*\(?0\d{4}\)?\s*\d{6}\
Dim expression As Regex = New Regex(pattern)
Return expression.IsMatch(RegExSt
End Function