Replies: 1 comment
-
You can implement your own rules, you will probably need to use a 3rd party library like import { parse } from 'date-fns';
import { defineRule, isValid } from 'vee-validate'; // or `extend` if vee-validate is v3
defineRule('date_format', (value, [format]) => {
const d = parse(format, value);
return isValid(d) ? true : 'Invalid date';
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I found example of using a rule "date_format". It looks like this was removed between version 2.x and 3. Is there another way to do this with vee-validate now?
Thanks for your time.
Beta Was this translation helpful? Give feedback.
All reactions