v0.2.0
- Support
Ref
data andRef
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 };
},
};