|
Validate:Android Binding Demo (v. 1.0)
Разработано Andy Tsui
|
* Technical Demo target for Android Developers *
This is a demo to Input validation support of Android Binding, a MVVM friendly framework.
Feature
* Validation against ViewModel Data.
* Validation rules set in @Annotation of public Fields
* Fully support for Custom Validation rules
Example
Suppose we need to validate the Login name that it is a required field:
<code>
@required
public Observable<String> Login;
</code>
That's it!
We can now call the Model Validator anytime:
<code>
ModelValidator.validateModel(this)
</code>
and it will return true or false, along with error messages.
Background of Android Binding
Android Binding is a new Open Source Framework for Android-Java providing xml layout view binding mechanism. It helsp development of Android Application by decoupling the View widgets and backend Activities. It is best work with MVP or MVVM patterns.
Project Homepage
http://code.google.com/p/android-binding/
My Blog
http://andytsui.wordpress.com/
Keyword
MVVM, binding, MVC, validation, validate