Forum Replies Created
-
I updated the code with what is below but it still is not working.
`jQuery(document).ready(function() {
jQuery(‘#field_29’).blur(function(e) {
if (validatePhone(‘field_29’)) {
jQuery(‘#spnPhoneStatus’).html(‘Valid’);
jQuery(‘#spnPhoneStatus’).css(‘color’, ‘green’);
}
else {
jQuery(‘#spnPhoneStatus’).html(‘Invalid’);
jQuery(‘#spnPhoneStatus’).css(‘color’, ‘red’);
}
});
});function validatePhone(field_29) {
var a = document.getElementById(field_29).value;
var filter = /^[0-9-+]+jQuery/;
if (filter.test(a)) {
return true;
}
else {
return false;
}
}I tried this as well but it did not work.
Is there any reason that The Phone Number field type does not validate phone numbers?
I added the following code to the bp-custom.php file but unfortunately it did not work.
<?php $(document).ready(function() { $('#field_29').blur(function(e) { if (validatePhone('field_29')) { $('#spnPhoneStatus').html('Valid'); $('#spnPhoneStatus').css('color', 'green'); } else { $('#spnPhoneStatus').html('Invalid'); $('#spnPhoneStatus').css('color', 'red'); } }); }); function validatePhone(field_29) { var a = document.getElementById(field_29).value; var filter = /^[0-9-+]+$/; if (filter.test(a)) { return true; } else { return false; } } ?>
Thanks for the link. Where would I add this code?
That worked. Thanks!
I looked on the profile edit screen but do not see this anywhere.
Also, there is nothing on my activity screen.