import type { FormRules } from 'element-plus'
export const rules = (): FormRules => {
    return {
        //手续费模板
        feeTemplate: [
            { required: true, message: '请选择手续费模板', trigger: ['blur'] },
        ],
        //风控模板
        riskTemplate: [
            { required: true, message: '请选择风控模板', trigger: ['blur'] },
        ],
        //所属上级
        agentUsername: [
            { required: true, message: '请选择所属上级', trigger: ['blur'] },
        ],
        //手机号
        phone: [
            { required: true, message: '请输入手机号', trigger: ['blur'] },
            { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: ['blur'] },
        ],
        //邮箱
        email: [
            { required: true, message: '请输入邮箱地址', trigger: ['blur'] },
            { type: 'email', message: '请输入正确的邮箱格式', trigger: ['blur'] }
        ],
        //是否升级为代理
        isUpgrade: [
            { required: true, message: '请选择是否升级为代理', trigger: ['blur'] },
        ],
        //选择状态
        status: [
            { required: true, message: '请选择状态', trigger: ['blur'] },
        ],
        //客户名称
        changeName: [
            { required: true, message: '请输入客户名称', trigger: ['blur'] },
        ],
    }
}