Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 155945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:14:43+00:00 2026-05-11T10:14:43+00:00

To clarify, I want to check for valid characters. For first name, last name

  • 0

To clarify, I want to check for valid characters. For first name, last name I want to check for [A-Za-z]. For Email I want to check for chars valid for email.

What algorithm would I use to CHECK user input? Specifically, I’d like to CHECK the user’s first name, last name and email address for valid characters before I add to database.

Obviously, something like this isn’t sufficient:

    if ( [firstName.text isEqualToString:@''] || [lastName.text isEqualToString:@''] || [emailAddress.text isEqualToString:@'']) { ... } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:14:43+00:00Added an answer on May 11, 2026 at 10:14 am

    Revised for your edit:

    What you probably want to look at is NSCharacterSet. It lets you define explicit sets of characters, which you can then use to test strings for presence of those characters. A trivial example:

    NSCharacterSet* nonAlphaNumericSet = [[NSCharacterSet alphanumericCharacterSet] invertedSet]; if ([someString rangeOfCharacterFromSet:nonAlphaNumericSet].location != NSNotFound) {     NSLog(@'It's not alphanumeric!'); } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I insert a new record in the users table, first check email and
First, I would like to clarify a quick question I have, am I right
When receiving user input on forms I want to detect whether fields like username
First I want to clearify that I mean by reverse engineering something like decompiling
Can someone please clarify using a SIMPLE user story the full slice of what
I want to write a function, and I want to learn about clarify and
I have an if statement where I want to say IF a check box
I am creating checkboxes through appendchild. I want to be able to check their
I want to check number of times a device ip address come to my
Note: To clarify, the question is not about the use of the restrict keyword

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.