PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 31st, 2012, 10:28 PM
ZeroCrash ZeroCrash is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 4 ZeroCrash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 5 m 11 sec
Reputation Power: 0
Lightbulb PHP-General - Asking for opinions on name validation

Should I assume it possible for people to have 1-letter names for the website I'm building, or should names be required to be at least 2 characters long? Should I allow underscores in a name, or any other characters in particular? Reasons with opinions please.

Reply With Quote
  #2  
Old December 31st, 2012, 10:45 PM
navnav's Avatar
navnav navnav is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Location: Oxford, United Kingdom
Posts: 40 navnav User rank is Private First Class (20 - 50 Reputation Level)navnav User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 2 h 18 m 23 sec
Reputation Power: 1
Send a message via Skype to navnav
Well in reality, parents can name their children whatever they like. However, I've never seen a name with just one letter.

I don't thing allowing users to use 1 letter names will do any harm (unless your target users are 12 year old girls under the delusion of Justin Beiber being their husband..).

But I would go with two letters as the minimum. Just because I think it's very unusual for someone to have a name containing just one letter.

I don't see why you should allow underscores. But you should allow hyphens and dots (.).

Reply With Quote
  #3  
Old December 31st, 2012, 11:21 PM
ZeroCrash ZeroCrash is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 4 ZeroCrash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 5 m 11 sec
Reputation Power: 0
Thanks, I wouldn't have thought to include dots of hyphens! I can see why that would make sense. I'd also like to add to this thread that in my current regex I've also included accented vowels. I might as well post it in case anybody here may find it useful:

^[a-zA-Z0-9âèéêëòóôöüù\.\-]{2,50}$

Reply With Quote
  #4  
Old January 1st, 2013, 12:25 AM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,867 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 22 h 33 m 7 sec
Reputation Power: 813
Hi,

arbitrarily choosing a few diacritics doesn't make a lot of sense, because there are many more of them (depending on the language).

Is this about real names or just user names? For user names, I'd only allow the alphanumerics (and maybe spaces) to ensure distinguishable and easy to type names. For real names, you probably want the printable characters from the first few blocks of the Basic Multilingual Plane plus spaces.

But be aware that "advanced" characters can be misused. For example, ligatures (letters composed from multiple characters) might be indistinguishable from a simple sequence of their components. So users might be able to "steal" the names of other users.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Asking for opinions on name validation

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap