<?php


namespace app\common\util;

class Validation
{
	public static function checkPhone($phone)
	{
		$g = "/^1[34578]\\d{9}\$/";
		$g2 = "/^19[89]\\d{8}\$/";
		$g3 = "/^166\\d{8}\$/";
		if (preg_match($g, $phone)) {
			return true;
		} else {
			if (preg_match($g2, $phone)) {
				return true;
			} else {
				if (preg_match($g3, $phone)) {
					return true;
				}
			}
		}
		return false;
	}
}