Validating Input


The following code assigns True to the Boolean variable blnFlag if the username strUserName contains valid characters—that is, if it contains only alphabetic characters and is less than 16 characters long:

blnFlag = ValidateInput.IsValidUserName(strUserName) 

The next line of code assigns True to the variable blnFlag if the password strPassword is less than or equal to 50 characters long:

blnFlag = ValidateInput.IsValidPassword(strPassword)

The following code assigns True to blnFlag if the first name strFirstName contains valid characters—that is, if it contains only alphabetic characters and is less than 16 characters long:

blnFlag = ValidateInput.IsValidFirstName(strFirstName)

The following code assigns True to blnFlag if the last name strLastName contains valid characters—that is, if it contains only alphabetic characters and is less than 16 characters long:

blnFlag = ValidateInput.IsValidLastName(strLastName)

The next line of code assigns True to blnFlag if the full name strFullName contains valid characters—that is, if it contains alphabetic characters with limited support for punctuation and is less than or equal to 50 characters long:

blnFlag = ValidateInput.IsValidFullName(strFullName) 




Security for Microsoft Visual Basic  .NET
Security for Microsoft Visual Basic .NET
ISBN: 735619190
EAN: N/A
Year: 2003
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net