Created
September 7, 2015 14:39
-
-
Save ninjacn/a0e47f2bd767a988b861 to your computer and use it in GitHub Desktop.
yii 动态修改rule
This file contains hidden or 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
| class LoginForm extends CFormModel | |
| { | |
| public $username; | |
| public $password; | |
| } | |
| $form = new LoginForm(); | |
| $form->validatorList->add( | |
| CValidator::createValidator('required', $form, 'username, password') | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment