/**
 * dateValid.js
 *
 * @Author: apple
 * @Date: 2018/4/25 18:29
 */

import moment from 'moment';

var dateValid = function dateValid(value, rule) {
    var bool = true;
    if (moment(value).isValid() || rule && !RegExp(rule).test(value)) {
        bool = false;
    }
    return bool;
};
export default dateValid;