# Steup
npm install @mudas/validate -S
Documents: view the document (opens new window)
# Build option
By default, babel-loader does not translate all files in node_modules, so specifying node_modules separately requires the esm module that babel translates
module.exports = {
transpileDependencies: [
'@mudas/*'
]
};
Note: The above is the configuration method of
vue.config.js
, please refer to relevant documents for other build environments
# Usage example
import {isEmail} from '@mudas/validate';
isEmail('aosnow@yeah.net');
// => true
Or direct reference to regular:
import {Email} from '@mudas/validate';
Email.test('aosnow@yeah.net');
// => true
# 目录
# 验证函数
# 正则表达式
验证函数 →