for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Milwad\LaravelValidate\Utils\CountryLandlineValidator;
class ZHLandlineValidator implements CountryLandlineValidator
{
/**
* Validate China landline numbers.
*/
public function validate($value): bool
return preg_match('/^(?:(?:\+86|0086)[\s\-]?0?[1-9]\d{1,2}\d{6,8}|0[1-9]\d{1,2}\d{6,8})$/', $value);
return preg_match('/^(?:...,2}\d{6,8})$/', $value)
integer
boolean
}