[GSoC 2012] Planned API changes - RFC

Tomasz Wasilczyk tomkiewicz.groups at gmail.com
Sat Jul 7 10:02:42 EDT 2012


>> >> 2) username validation
>> > Does username normalisation count as validation?
>>
>> At this point - no. Invalid usernames should not be allowed to type in
>> dialogs like account setup.
>>
>> But we can use normalize function - there is only need to specify,
>> that if it returns NULL, that mean username is totally invalid. For
>> example, in number-based usernames, normalization for "[space]1234"
>> will return "1234", but for "1234x" will it be NULL. That also have to
>> be handled in UI.
>
> This seems logical, and almost free, to me.

I've implemented this feature on libpurple side and partially on
pidgin UI side [1]. Please comment. Next step will be validation
handling at buddy adding dialog.

The only doubt I have, is purple_validate taking PurplePlugin argument
instead of PurpleAccount. For example, at account setup dialog,
account isn't known yet. Is it OK anyway?

Tomek

[1] http://pastebin.com/raw.php?i=ndYkyPWu




More information about the Devel mailing list