toscawidgets/tw2.core — pull request #8 by amol- (2012-03-17 10:58:09+00:00)
Title: When widgets have key they should be validated by key and not be id

Issue came up on IRC while porting sprox to tw2 as sprox uses sx_[*] as the field id and [*] as the key due to the fact that is might have fields named starting with an "_" which would result in an invalid id.

[22:19] widgets are filled with values using the widget key
[22:19] but then they are validated using the id to lookup the value
[22:19] by default id and key equals
[22:19] but in my case I have ids which are different from keys
[22:20] and so validation fails as the parameter is user_name but it looks for sx_user_name which is the id
[22:32] uhm, after validating by id it revalidates by keys, so the idea is probably that the value is overidden by its key version
[22:32] the issue is that actually the validator crashes when it gets None