In register.php and member.php replace this:
Code:
$$varname=censortext($$varname);
// ENTER ANY CUSTOM FIELD VALIDATION HERE!
With this:
Code:
$$varname=censortext($$varname);
if ($profilefield['profilefieldid'] == XX and preg_match('#[0-9]{10}#', $$varname)) {
$$varname = '('.substr($$varname, 0, 3).') '.substr($$varname, 3, 3).'-'.substr($$varname, 6);
}
// ENTER ANY CUSTOM FIELD VALIDATION HERE!
(
Without the spaces; quote this message to see the real source)