導(dǎo)出一個(gè)
import xx from "xx"
let validAmountReg= (rule, value, callback) => {
if (!value) {
return callback(new Error("金額不能為空!"));
} else {
let reg = validAmounts.validAmount;
if (reg.test(value)) {
callback();
} else {
return callback(new Error(validAmounts.validAmountMessage));
}
}
};
export default validAmountReg
直接調(diào)用 validAmountReg
導(dǎo)出多個(gè)
export var validNames =
export var validNames = (rule, value, callback) => {}
export var validNames = (rule, value, callback) => {}
引入
import * as addChannelReg from '../validate/addChannelReg';
addChannelReg .validNames
...