Skip to content

Releases: Ilhasoft/data-binding-validator

2.0.0

23 Oct 19:26
c678970
Compare
Choose a tag to compare

Major Update

Build tools to 28.0.3
Gradle 3.2
Dependencies to last stable version
Switch to material's design TextInputLayout
Migrate from support library to androidx

1.0.0

05 Nov 16:28
Compare
Choose a tag to compare

Updates

  • Android Build tools 3.0.0 and Gradle 4.3
  • Add Apacha License

Fixes

  • Fix CPF validation

Validation listener

02 Apr 23:10
Compare
Choose a tag to compare

Now you can get validation result through a ValidationListener:

...
Validator validator = new Validator(binding);
validator.setValidationListener(this);

//Call this method to invoke listener
validator.toValidate();
...

Receive the result:

...
@Override
public void onValidationSuccess() {
  saveToDatabase();
}

@Override
public void onValidationError() {
  Toast.makeText(YourActivity.this, "Invalid data!", Toast.LENGTH_SHORT).show();
}
...

Validation methods for specific views

28 Mar 13:20
Compare
Choose a tag to compare

Now you can apply validation on single or multiple views:

...
Validator validator = new Validator(binding);
validator.validate(binding.nameText);
...

or

...
Validator validator = new Validator(binding);
validator.validate(Arrays.asList(binding.usernameText, binding.emailText));
...

Refactor auto dismiss behavior

27 Mar 17:06
Compare
Choose a tag to compare

The version 0.6.2 includes:

  • Refactor auto dismiss binding adapter to avoid nullable parameter and receive false by default;
  • Update support libraries;