hie i have a php form which will require a user to enter an ID Number in this particular form e.g.
34 1297336 Z 42 how to i create an easy and neat validation for that field. thanks any help will be appreciated!

Recommended Answers

http://php.net/preg_match

A pattern could be something like:

\d{2} \d{7} [A-Z] \d{2}

(depending on your exact requirements).

Jump to Post

All 2 Replies

http://php.net/preg_match

A pattern could be something like:

\d{2} \d{7} [A-Z] \d{2}

(depending on your exact requirements).

thanks it works like a charm

Be a part of the DaniWeb community

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