Try this...

Select the range D10:D14
Goto Data>Data Validation
Allow: Custom
Formula:

=AND(COUNT(D10),D10>=0,SUM(D$10:D$14)<=8)