Last active
September 24, 2015 17:37
-
-
Save bijayrungta/784409 to your computer and use it in GitHub Desktop.
Validation Rules for the 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
class MyModel { | |
/** | |
* @return array validation rules for model attributes. | |
*/ | |
public function rules() | |
{ | |
return array( | |
array( | |
'element', | |
'type', | |
'type' => 'string' | |
), | |
array( | |
'content', | |
'type', | |
'type' => 'string' | |
), | |
array( | |
'suggestion', | |
'type', | |
'type' => 'string' | |
), | |
array( | |
'notes', | |
'type', | |
'type' => 'string' | |
), | |
array( | |
'id, seo_project_id, webpage_id, user_id', | |
'numerical', | |
'integerOnly' => true | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment