Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function rules()
- {
- // NOTE: you should only define rules for those attributes that
- // will receive user inputs.
- return array(
- array('slide_name, create_by, create_date, slide_image', 'required'),
- array('create_by, update_by', 'numerical', 'integerOnly' => true),
- array('slide_name', 'length', 'max' => 30),
- array('slide_link, update_date', 'safe'),
- array('slide_image', 'file', 'types'=>'jpg, png','maxSize'=>1024*1024*5,'tooLarge'=>'The file was larger than 5MB. Please upload a smaller file.'),
- // The following rule is used by search().
- // @todo Please remove those attributes that should not be searched.
- array('id, slide_name, slide_image, slide_link, create_by, create_date, update_by, update_date', 'safe', 'on' => 'search'),
- );
- }
- slide_image << ini nama field buat upload image
Advertisement
Add Comment
Please, Sign In to add comment