[#283] Detailed validation of JID
Summary Detailed validation of JID
Queue gloox
Queue Version 1.0.22
Type Enhancement
State Unconfirmed
Priority 1. Low
Requester pulkomandy (at) pulkomandy (dot) tk
Created 07/13/2019 (43 days ago)
Updated 07/13/2019 (43 days ago)

07/13/2019 12:28:46 PM pulkomandy (at) pulkomandy (dot) tk Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Detailed validation of JID
Queue ⇒ gloox
Reply to this comment
I'm writing a client based on gloox and I would like to provide 
precise feedback to users when their JID is invald or may be modified 
by the string prep algorithms. Currently I can only check if the JID 
is valid using the bool cast operator, and maybe check if the string 
representation is identical to what I passed to the constructor.

I would like to know:
- If the string is really not looking like a JID (for example, no @)
- If the username is too long (I think the limit is 1023 characters)
- If there are unprintable characters, spaces or control characters in it
- If a reserved character is used (my current code checks for :@<>'"& 
but I don't know if that's appropriate)

Could gloox provide somthing of that level of detail when validating a JID?