| 开发者 | tanvir11744 |
|---|---|
| 更新时间 | 2026年10月19日 01:15 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[nombar] shortcode adds a self-validating phone field to any page or plain HTML form.nombar_normalize_phone() and nombar_validate_phone(), plus filters for prefixes, error messages and more.[nombar] shortcode on any page, or call nombar_normalize_phone() / nombar_validate_phone() from your own plugin or theme.
Does it support landline numbers?
No. It validates mobile numbers only, because mobile numbers are what couriers and SMS tools need. Numbers starting with the Dhaka area code 02 and other landline codes will not pass.
Can I change the valid prefixes?
Yes, with the nombar_operator_prefixes filter:
add_filter( 'nombar_operator_prefixes', function( $prefixes ) { $prefixes['0132'] = 'Custom'; return $prefixes; } );
Why did a real-looking number get rejected?
The fake-number check rejects numbers whose last eight digits are all identical, like 01711111111. If you would rather accept anything with a valid prefix, untick the strictness option on the settings page, or use the nombar_reject_repeated_digits filter.
Does it work with the WooCommerce block checkout?
Yes. The classic checkout validates through the standard checkout hooks. The block checkout (the default on new WooCommerce installs) works too: Bangla digits are normalized before WooCommerce checks them, and anything with a bad prefix, wrong length or fake pattern is blocked when the order is placed, with the same friendly error.
nombar-bd-mobile-validator folder to /wp-content/plugins/, or install the plugin through the WordPress plugins screen.No. It only touches numbers entered while the plugin is active, so your order history stays exactly as it is.
The live hint formats the field when the customer leaves it, so they can see the corrected number. Server-side validation is always the final authority.
On the WooCommerce order edit screen, in the billing (and shipping) phone field — saved in the format you chose.