Mesith / android-binding

Automatically exported from code.google.com/p/android-binding
0 stars 0 forks source link

Error message in Hash #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[Feature request]

Make Error message of model validation organized in a hash table.

Original issue reported on code.google.com by gueei....@gmail.com on 6 Feb 2012 at 1:41

GoogleCodeExporter commented 9 years ago
Reworked Validation framework. 

I planned to remove validation from the main library in later releases, but 
until then, the validation is under "labs" sub package: 
gueei.binding.labs.validation

While keeping validators almost the same, lots of underlying changes is made. 
The Resource String no longer handled by individual validators but the 
ModelValidator since additional knowledge on the Context and Class containing 
the resource string is required. 

Since no more constant res id, to get around that issue, resource is given by 
the name instead, and ModelValidator will try to turn the name to int and to 
the localized resource string, defined in final XML file. 

Another improvement is the Error Message returned by ModelValidator contains 
individual Property's error message, in a hashtable <name, array> manner. 

Original comment by gueei....@gmail.com on 5 Mar 2012 at 8:17