How to implement UserID format rules

Hi

i have just installed openfire 3.6.3 with embedded database option.i can commincate using two Psi client.how can i implement username rules so that client application can create a new user only if it follows a particuler criterae .e.g i want that user must register a username like XXXX_username. where X coud be an number from 0-9 , or i can implemenet a rule that usename must be numeric only. is there any server option to do that OR if it requires to write a new plug in ,in case of plugin where to start from t. thank you

Arslan