from ckan.lib.navl.validators import ignore_empty, not_empty
from ckan.logic.validators import (
    name_validator, boolean_validator, is_positive_integer, isodate,
    group_id_exists)


def default_inventory_entry_schema():
    schema = {
        'id': [unicode, ignore_empty],
        'title': [unicode, not_empty],
        'group_id': [group_id_exists],
        'is_recurring': [boolean_validator],
        'recurring_interval': [is_positive_integer],
        'last_added_dataset_timestamp': [isodate],
    }
    return schema


def default_inventory_entry_schema_create():
    schema = {
        'title': [unicode, not_empty],
        'recurring_interval': [is_positive_integer],
    }
    return schema

@@ -129,34 +129,39 @@
 idator, 
-is_positive_intege
+natural_number_validato
 r, isoda
@@ -433,34 +433,39 @@
 rval': %5B
-is_positive_intege
+natural_number_validato
 r%5D,%0A    
@@ -671,26 +671,31 @@
 ': %5B
-is_positive_intege
+natural_number_validato
 r%5D,%0A

Allow zeros for recurring interval