6
Also i will be using the user profile module to handle the registration. I need to know how do i customize the username that a person can select. Basically the site is for a hypnotherapy institute being developed for its students and teachers. Now for the students the username to be used for regisrtation should be the certificate no. for the last course they have done.
Certificates no. for all courses have a standard pattern. All certificate start with the name of the institute followed by the name of the city in which courses where conducted followed by the initials of the teachers then initials of the course followed hy the date and finally the "S.No." of the sudent.
So for emaple if the name of institute is "ABCD", city in which the course conducted is "Bombay", name of the instructor is "Nitin Shah", name of course is "step 1" date is "16-12-2008" and the serial no. of the student is "15", the certificate no. for the student will be ABCD BOM NS S1 161208 15 without spaces ie ABCDBOMNSS116120815
Now my question is that is there a way to ensure that while registration the system checks that the student has entered the username in this format say for example
the first four letter of the username are "ABCD",
the 11th and 12th letters are either s1, s2, s3, s4 or s5.
And only if the username is in this format will the registration proceed otherwise it will show an error saying username is not in the correct format.