diff --git a/manifests/object/notification.pp b/manifests/object/notification.pp index 9742f64cb..7eac520c2 100644 --- a/manifests/object/notification.pp +++ b/manifests/object/notification.pp @@ -123,7 +123,7 @@ if !is_string($user_groups) { validate_array($user_groups) } if $times { validate_hash ($times )} if $command { validate_string ($command )} - if $interval { validate_integer ($interval )} + if $interval { validate_re($interval, '^\d+(\.\d+)?[dhms]?$')} if $period { validate_string ($period )} if $zone { validate_string ($zone) } if !is_array($types) { validate_string($types) } diff --git a/manifests/object/scheduleddowntime.pp b/manifests/object/scheduleddowntime.pp index 506c68861..daacd3a85 100644 --- a/manifests/object/scheduleddowntime.pp +++ b/manifests/object/scheduleddowntime.pp @@ -88,7 +88,7 @@ if $author { validate_string($author) } if $comment { validate_string($comment) } if $fixed { validate_bool($fixed) } - if $duration { validate_integer($duration) } + if $duration { validate_re($duration, '^\d+(\.\d+)?[dhms]?$') } if $ranges { validate_hash($ranges) } # compose attributes