Skip to content

Commit

Permalink
Merge pull request #5 from onlyquan/master
Browse files Browse the repository at this point in the history
增加validate->is phone
  • Loading branch information
hanwenbo authored Dec 18, 2018
2 parents 88b7f80 + 85367a4 commit 51b559d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,10 @@ public function is( $value, $rule, $data = [] )
// 是否为json
$result = $this->json( $value );
break;
case 'phone':
$result = $this->phone( $value );
break;
//TODO email
default:
if( isset( self::$type[$rule] ) ){
// 注册的验证规则
Expand Down

0 comments on commit 51b559d

Please sign in to comment.