for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://github.com/phpviet/validation
*
* @copyright (c) PHP Viet
* @license [MIT](https://opensource.org/licenses/MIT)
*/
namespace PHPViet\Validation\Rules;
* @author Vuong Minh <[email protected]>
* @since 1.0.0
class MobileVN extends AbstractStaticRegexRule
{
public static function pregFormat(): string
return strtr('~^(\+?84|0)(::head::)\d{7}$~', [
'::head::' => implode('|', [
'3[2-9]',
'5[2689]',
'7[06-9]',
'8[1-9]',
'9[0-9]',
]),
]);
}