Skip to content

v0.2.0

Compare
Choose a tag to compare
@anh-ld anh-ld released this 16 Jun 05:39
· 97 commits to master since this release
  • Support Ref data and Ref rules.
export default {
  setup() {
    const data = ref({ name: 'Evelyn' });
    const rules = ref({
      name: {
        name: 'required',
        test: value => Boolean(value),
        message: 'Name must not be empty.',
      },
    });

    const { result } = useValidate(data, rules);

    return { result, data };
  },
};