Validate username

Is there any class in Smack that validates a given username that will passed into the AccountManager.createAccout() method. I assume there are certain characters that cannot be in a username like ‘’@’’.

I would rather validate the name before I make the call to the server.

Thanks

Brian

Brian,

XMPP deals with this by using the “nodeprep” stringprep profile. Basically, this is a way to normalize and validate usernames for XMPP. We don’‘t support this in Smack yet. However, we have added support to our new Whack project. If you’'re interested, you could check that code out from CVS and use the JID class to validate usernames. If you need any help doing this, please let us know.

We’'ll most likely add in full stringprep support for Smack 2.0.

Regards,

Matt