Last active
April 7, 2016 00:47
-
-
Save mdmunir/92088b72764ed96859347b4ea806cd5c to your computer and use it in GitHub Desktop.
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 Contact extends Model | |
| { | |
| public function rules() | |
| { | |
| return [ | |
| // name, email, subject and body are required | |
| [['name', 'email', 'subject', 'body'], 'required'], | |
| // email has to be a valid email address | |
| ['email', 'email'], | |
| // verifyCode needs to be entered correctly | |
| ['verifyCode', 'captcha'], | |
| ]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment