I'm trying to validate first and last names, but everything I try it seems to accept. If I input KYle, it accepts it, Kyle, accepts it, but KYLE doesn't accept it. Hopefully someone can show me what I'm doing wrong...
Code:
ereg("([A-Z]{1})([a-z])", $name)
I thought this would accept the first digit as uppercase, then the rest being lowercase.
And this is a very generic check...there isn't anything in there for more unique names with dashes in it and stuff like that. I've tried googling help with ereg, but all the places I find just show examples and not how they act, nor really how to create your own custom ereg() function.
|