Reply To: Phone Number Validation

Home Forums User Registration Phone Number Validation Reply To: Phone Number Validation



Many thanks, but I just realized that input mask is not validation pattern like: ^\+?\d{0,13}. I would need a pattern, because there is a range of different phone number lengths. Is there any possibility to add html validation patterns?

Furthermore, I would like to add woocommerce billing_title which should be a select with options like Mr. and Mrs. Because it is not available under woocommerce fields, I tried to use an extra select field and removing the prefix but it didn’t work with the following code:

add_action( 'user_registration_fields_without_prefix', 'ur_add_no_prefix' );
function ur_add_no_prefix( $fields ) {

    $fields[] = 'select';

    return $fields;

Maybe you could also add a woocommerce title field (‘billing_title’)?