{"size": 668, "ext": "js", "max_stars_repo_path": "src/utils/validators.js", "max_stars_repo_name": "trnitin/nutrition", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/utils/validators.js", "max_issues_repo_name": "trnitin/nutrition", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/utils/validators.js", "max_forks_repo_name": "trnitin/nutrition", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.6470588235, "max_line_length": 82, "alphanum_fraction": 0.498502994}
export function validatePan(pan) {
    let regPan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/;

    if (regPan.test(pan)) {
        return true;
        // valid pan card number
    } else {
        return false;
        // invalid pan card number
    }
}

export function validateEmail(email) {
    let regEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;;

    if (regEmail.test(email)) {
        return true;
    } else {
        return false;
    }
}


export function validateMobile(mobile) {
    let regMobile = /^(\+\d{1,3}[- ]?)?\d{10}$/;


    if (regMobile.test(mobile)) {
        return true;
    } else {
        return false;
    }
}
