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