Skip to content

v0.2.2

Compare
Choose a tag to compare
@anh-ld anh-ld released this 25 Jul 14:43
· 51 commits to master since this release
  • Fix wrong result when data has multiple nested properties.
  • Async $test method.
await result.$test();
console.log('Tested');
  • Cancel async validation on resetting.
  • Add more parameters (data, rules, options) to test function. Also, update rule properties.
const rules = reactive({
  name: {
    // rule now has (name, test, message) properties instead of ($key, $test, $message) properties
    name: 'required',
    test: (value, data, rules, options) => {
      // you can access data, rules, options here
      return Boolean(value);
    },
    message: 'Name must not be empty.',
  },
});
  • Support Vue 2.
  • Add transform option.