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

All 2 Replies


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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.