# flexible-checkout-fields/4.1.40/src/Settings/Option/RegexPhoneOption.php

Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager, version 4.1.40. 63 lines.

- Page: https://pluginprobe.com/plugins/flexible-checkout-fields/4.1.40/code/src/Settings/Option/RegexPhoneOption.php
- Raw: https://pluginprobe.com/plugins/flexible-checkout-fields/4.1.40/raw/src/Settings/Option/RegexPhoneOption.php
- Modified: 2026-08-05T10:33:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/flexible-checkout-fields/4.1.40/code/src/Settings/Option/RegexPhoneOption.php#L10-L20`.

```php
<?php

namespace WPDesk\FCF\Free\Settings\Option;

use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;

/**
 * {@inheritdoc}
 */
class RegexPhoneOption extends OptionAbstract {

	const FIELD_NAME = 'validation_regex';

	/**
	 * {@inheritdoc}
	 */
	public function get_option_name(): string {
		return self::FIELD_NAME;
	}

	/**
	 * {@inheritdoc}
	 */
	public function get_option_tab(): string {
		return AdvancedTab::TAB_NAME;
	}

	/**
	 * {@inheritdoc}
	 */
	public function get_option_type(): string {
		return self::FIELD_TYPE_TEXT;
	}

	/**
	 * {@inheritdoc}
	 */
	public function get_option_label(): string {
		return __( 'Validation regex', 'flexible-checkout-fields' );
	}

	/**
	 * {@inheritdoc}
	 */
	public function get_label_tooltip(): string {
		return __( 'Enter the number format using the regex code. Our documentation contains sample formats.', 'flexible-checkout-fields' );
	}

	/**
	 * {@inheritdoc}
	 */
	public function get_label_tooltip_url(): string {
		return apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-phone-validation-regex' );
	}

	/**
	 * {@inheritdoc}
	 */
	public function sanitize_option_value( $field_value ) {
		return sanitize_text_field( $field_value );
	}
}

```
