Created
July 21, 2015 02:49
-
-
Save yantze/ab303dfc97a0345f990e to your computer and use it in GitHub Desktop.
dynamic model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$phoneset = ''; | |
$content = ''; | |
$type = 'uid'; | |
$types = [ | |
'uid' =>'使用uid', | |
'phone'=>'电话号码', | |
]; | |
$model = DynamicModel::validateData(compact('phoneset', 'content', 'type', 'types'), [ | |
['phoneset', 'string', 'min' => 11], | |
['content', 'string', 'max' => 340, 'min' => 2], | |
['type', 'string'], | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment