[nycphp-talk] Valudating common field types
David Krings
ramons at gmx.net
Mon Oct 26 15:48:11 EDT 2009
Yogesh Agashe wrote:
> Hello,
>
> This is my first post to this NYPHP mailing list. So hello to everyone
> and thanks for the thorough discussions which help a beginner developer
> like me.
Welcome, was the same with me, except that I never really left beginner stage.
> Is there any other way to validate first and last names. It will be nice
> to have have inbuilt function for such commonly used field types. I will
> like to know how people tackle these issue.
> Thanks.
>
The only thing I would check is that the fields are not empty. The maximum
length is set via the maxlength parameter in HTML and everything else
qualifies as a valid name. I don't think you can reasonably script validation
to make sure that the first name entered is "Dirk" and not "Dork".
David
More information about the talk
mailing list