Skip links

Telefon numarası kontrolu


Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118
Telefon numarası kontrolu

Merhaba
Bü gün lazım oldu bir telefon numarası kontrolu yazdım.
Basit bir kontrol yaptım telefon numarasının  uzunluğu ve sayılardan oluşmasını denetliyor
Metod şöyle:

static boolean PhoneValidation(str _phone)
{
boolean ret = false;
;
if(strLen(_phone) != 0){
if(!Global::isInteger(_phone))
ret = checkFailed(‘Telefon numarası sadece rakamlardan oluşmalıdır.’);
else if ((strLen(_phone) == 10) || (strLen(_phone) == 0))
{
ret = true;
}
else
ret = checkFailed(‘Hatalı giriş yaptınız. Telefon numarasını başında 0 olmadan alan kodu ile birlikte giriniz.’);
}
else
{
ret = true;
}
return ret;
}

Opinions

Join the Discussion