ObjectResource::rules PHP Method

rules() public method

public rules ( ) : array
return array validation rules for model attributes.
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(array('resource_order', 'numerical', 'integerOnly' => true), array('object_id, resource_id', 'length', 'max' => 20), array('description,type', 'safe'), array('object_id, resource_id, resource_order, description,type', 'safe', 'on' => 'search'));
    }