Jsr-303 Compatible Bean Validator For Android
Solution 1:
Whiche CNF did you exactly get? If it is about java.beans.Introspector
, this is fixed as of HV 5.1.0.Alpha1 which doesn't import this type anymore and thus should run on Android. If it is about other APIs it would be very interesting to know which ones.
Solution 2:
I came to this question, following my quest for some integration of JSR 343 and Angular.js , which should be more trickier than in your case , as well, with Android you develop with Java.
If you look at valdr you will see a framework with model centric approach to validation in angular.js and you will see there a plugin to support JSR 303. The plugin is composed of several components, you might want to consider "imitating" in Android, for client-server applications and have one "central place" that defines the rules of validation. For this you will probably need the following:
- Define the classes at server side to scan for JSR 303 annotations
- Which classes that your android app are mapped to these java beans
- A way to get the scanning result and dynmically construct a set of rules
- Use each rule when a setter on an object that was mapped is being activated.
If this is an android app with no server, then I guess you should try to port the source for JSR 303 to be use with Android
Post a Comment for "Jsr-303 Compatible Bean Validator For Android"