Object::extraRules PHP Method

extraRules() public static method

public static extraRules ( )
    public static function extraRules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(array('total_number_meta, total_number_resource, object_slug', 'safe'), array('object_name', 'required'), array('object_content', 'length', 'min' => 10), array('object_description,object_keywords,object_excerpt,object_title,guid', 'safe'), array('object_date, object_date_gmt, object_status, comment_status, object_modified, object_modified_gmt, lang, total_number_meta, total_number_resource, object_view, like, dislike, rating_scores', 'numerical', 'integerOnly' => true), array('rating_average', 'numerical'), array('object_author, object_password, object_parent, object_type, comment_count', 'length', 'max' => 20), array('guid, object_keywords, object_author_name', 'length', 'max' => 255), array('layout', 'length', 'max' => 125), array('tags', 'checkTags'), array('tags', 'normalizeTags'), array('person', 'safe'), array('object_id, object_author, object_date, object_content, object_title, object_status, object_name', 'safe', 'on' => 'search,draft,published,pending'));
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @return array validation rules for model attributes.
  */
 public function rules()
 {
     return CMap::mergeArray(array(), Object::extraRules());
 }
All Usage Examples Of Object::extraRules