public static function address1($check)
{
$pattern = '/^[a-zA-Z\\p{Cyrillic} \\.]+,/u';
return (bool) preg_match($pattern, $check);
}
/** * test address method of RuValidation * * @return void */ public function testAddress() { $this->assertTrue(RuValidation::address1('Московский пр., д. 100')); $this->assertTrue(RuValidation::address1('Moskovskiy ave., bld. 100')); $this->assertFalse(RuValidation::address1('I would not tell')); }