async-validator icon indicating copy to clipboard operation
async-validator copied to clipboard

`type: date` not work

Open xianjie-li opened this issue 5 years ago • 0 comments

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

xianjie-li avatar Jun 02 '20 14:06 xianjie-li