package com.cooleshow.usercenter.helper;

import android.text.TextUtils;

import com.cooleshow.base.utils.ToastUtils;

/**
 * Author by pq, Date on 2022/4/24.
 */
public class PhoneCheckHelper {
    public static boolean checkPhoneValidity(String phone) {
        if (TextUtils.isEmpty(phone)) {
            ToastUtils.showShort("手机号不可为空");
            return false;
        }
        return true;
    }

    public static boolean checkPwdValidity(String pwd,String pwdAgain) {
        if(TextUtils.isEmpty(pwd) || TextUtils.isEmpty(pwdAgain)){
            ToastUtils.showShort("请重新输入密码");
            return false;
        }
        if (!TextUtils.equals(pwd,pwd)) {
            ToastUtils.showShort("两次输入密码不一样,请重新输入");
            return false;
        }
        return true;
    }
}
