Hello Devlend,
Here's a link to an app that contains a custom field ($C_TotalSlack) that calculates slack in days: https://www.clarizen.com/apps/total-slack/
I think that if you built the validation rule on the task entity with the following evaluation criteria, this might work:
IsChanged($DueDate) && DateSubtract($DueDate, GetPreviousValue($DueDate), TRUE) > $C_TotalSlack
This may need some tweaking, but I think that in theory it should work.
I hope this helps.
Roland