휴대폰 필수 입력일 때 유효성 체크기능 추가 - 사노라가노라님 제안

This commit is contained in:
chicpro
2014-05-19 10:00:28 +09:00
parent 67530cc3a5
commit 15b224917a
3 changed files with 25 additions and 0 deletions

View File

@ -73,6 +73,11 @@ if ($w == '' || $w == 'u') {
if ($msg = valid_mb_email($mb_email)) alert($msg, "", true, true);
if ($msg = prohibit_mb_email($mb_email))alert($msg, "", true, true);
// 휴대폰 필수입력일 경우 휴대폰번호 유효성 체크
if (($config['cf_use_hp'] || $config['cf_cert_hp']) && $config['cf_req_hp']) {
if ($msg = valid_mb_hp($mb_hp)) alert($msg, "", true, true);
}
if ($w=='') {
if ($msg = exist_mb_id($mb_id)) alert($msg);

View File

@ -400,6 +400,16 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
}
}
<?php if (($config['cf_use_hp'] || $config['cf_cert_hp']) && $config['cf_req_hp']) { ?>
// 휴대폰번호 체크
var msg = reg_mb_hp_check();
if (msg) {
alert(msg);
f.reg_mb_hp.select();
return false;
}
<?php } ?>
if (typeof f.mb_icon != 'undefined') {
if (f.mb_icon.value) {
if (!f.mb_icon.value.toLowerCase().match(/.(gif)$/i)) {

View File

@ -394,6 +394,16 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
}
}
<?php if (($config['cf_use_hp'] || $config['cf_cert_hp']) && $config['cf_req_hp']) { ?>
// 휴대폰번호 체크
var msg = reg_mb_hp_check();
if (msg) {
alert(msg);
f.reg_mb_hp.select();
return false;
}
<?php } ?>
if (typeof f.mb_icon != "undefined") {
if (f.mb_icon.value) {
if (!f.mb_icon.value.toLowerCase().match(/.(gif)$/i)) {