Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Form of forms + bugfix

Latest
Compare
Choose a tag to compare
@mlykotom mlykotom released this 14 Nov 21:59
· 1 commit to master since this release

Form of forms

  • you can now create form containing other form!
  • useful when having some multi-step UI and want to validate each part separately, but overall as well.
  • you can mix form with fields

Usage:

public class MyViewModel extends ViewModel {
  public final field1 = ValiFieldText();
  public final field2 = ValiFieldText();
  public final subForm = ValiFiForm(field1, field2);

  public final field3 = ValiFieldText();

  // you can even mix form with fields (e.g. some "accept terms" checkbox?)
  public final overallForm = ValiFiForm(subForm, field3);
}

Bug fixes

  • fixed a bug, when field wouldn't be isValid() when belonging to a form in databinding (form.valid would be called properly, but field.valid wouldn't)