/**
 * 简单验证 字段是否空
 * @param {*} allParam 
 * @param {*} validParam 
 */
function validParamIsEmpty(allParam, validParam) {

    for (let key in validParam) {
        if (!allParam[key]) {
            return { "code": -1, "msg": validParam[key] }
        }
    }

    return { "code": 0, "msg": "success" }

}

/**
 * 将表单序列化的字段转换为对象格式
 * @param {*} allParam 
 */
function serializeArrayToObj(arrayParam) {
    let objParam = {};
    for (let key in arrayParam) {
        objParam[arrayParam[key].name] = arrayParam[key].value
    }
    return objParam;
}

function checkEmailFormat() {

}

function checkMobileFormat() {

}

function checkAgeFormat() {

}