async-validator
async-validator copied to clipboard
`type: date` not work
const source = {
date: 'qwertyu', // or ' ' | '12345' | anything
};
const rules = {
date: {
required: true,
type: 'date',
}
};
new Schema(rules).validate(source, err => {
console.log(222, err); // did not execute here, nothing happened.
});
link: https://codesandbox.io/s/aged-darkness-2u8wr?file=/src/index.js