Last active
August 29, 2015 13:56
-
-
Save ImDevinC/9283524 to your computer and use it in GitHub Desktop.
One string!
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
'Validate first name | |
Dim passenger As String | |
If strFirstName.Length <= 30 Then | |
passenger = strFirstName + " " | |
Else : MessageBox.Show("First name must be less than 30 characters") | |
End If | |
'Validate middle initial | |
If strMiddleName Like "[aA-zZ]" Then | |
passenger += strMiddleName + " " | |
Else : MessageBox.Show("Middle name must be a single initial") | |
End If | |
'Validate last name | |
If strLastName.Length <= 30 Then | |
passenger += strLastName | |
Else : MessageBox.Show("Last name must be less than 30 characters") | |
End If | |
PassengerDataList.Items.Add(passenger) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment