I need help on writing a function to validate that a user has entered their full name (so at least two names must exist in the textbox). I'm such a newbie to vb.net

Recommended Answers

All 2 Replies

Lets see your validation code that you are working on and fix it.

No matter how you validate a text, you can never be certain that you've got the full name. At best you can validate that you've got a space between 2 chunks of string.
You can do the extra mile and check the length of strings separated by the space, but even then you can't be sure that a) there is no user with first name "AJ" for example or b)that you are not validating as good data an input like "aaaa bbbbbbb".

If you try to verify the names against a list of possible names your validation is doomed before you start coding.

If the full name input is vital to your cause, have a person verify the already "verified" data.

PS: Some code would be helpfull in determining where (VB or db) you wish to validate and how/what.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.